forked from ronamosa/docker-wordpress-nginx-ssl-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (61 loc) · 1.42 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: lemp
services:
mariadb:
image: mariadb:11.2.3-jammy
container_name: mariadb
restart: always
expose:
- 3306
volumes:
- lemp_db_data:/var/lib/mysql
environment:
MARIADB_DATABASE: rds_mysql
MARIADB_USER: wpress
MARIADB_PASSWORD: wpress_247x
MARIADB_ROOT_PASSWORD: root_wpress_247x
networks:
- nginx
wordpress:
depends_on:
- mariadb
image: wordpress:6.5.2-php8.1
container_name: wordpress
restart: unless-stopped
expose:
- 80
- 443
extra_hosts:
- wordpress.local:172.17.0.1
environment:
WORDPRESS_DB_HOST: mariadb
WORDPRESS_DB_USER: wpress
WORDPRESS_DB_PASSWORD: wpress_247x
WORDPRESS_DB_NAME: rds_mysql
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
networks:
- nginx
nginx:
image: nginx:1.25.2
container_name: nginx
restart: unless-stopped
depends_on:
- wordpress
ports:
- 80:80
- 443:443
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/ssl/my_wpress_site.crt:/etc/nginx/my_wpress_site.crt
- ./nginx/ssl/my_wpress_site.key:/etc/nginx/my_wpress_site.key
- /var/log/nginx:/var/log/nginx
networks:
- nginx
volumes:
lemp_db_data:
external: true
networks:
nginx:
name: nginx