-
Notifications
You must be signed in to change notification settings - Fork 330
/
docker-compose.yml.defaults
80 lines (75 loc) · 2.15 KB
/
docker-compose.yml.defaults
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3.9'
services:
wordpress:
# default port 80
image: wordpress:5-fpm
container_name: wp-wordpress
env_file:
- .env
restart: unless-stopped
networks:
- wordpress
depends_on:
- database
volumes:
- ${WORDPRESS_LOCAL_HOME:-./wordpress}:/var/www/html
- ${WORDPRESS_UPLOADS_CONFIG:-./config/uploads.ini}:/usr/local/etc/php/conf.d/uploads.ini
# - /path/to/repo/myTheme/:/var/www/html/wp-content/themes/myTheme
environment:
- WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-database:3306}
- WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME:-wordpress}
- WORDPRESS_DB_USER=${WORDPRESS_DB_USER:-wordpress}
- WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password123!}
database:
# default port 3306
image: mysql:8
container_name: wp-database
env_file:
- .env
restart: unless-stopped
networks:
- wordpress
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-wordpress}
- MYSQL_USER=${MYSQL_USER:-wordpress}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-password123!}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-rootpassword123!}
volumes:
- ${MYSQL_LOCAL_HOME:-./dbdata}:/var/lib/mysql
command:
- '--default-authentication-plugin=mysql_native_password'
nginx:
# default ports 80, 443 - expose mapping as needed to host
image: nginx:1
container_name: wp-nginx
env_file:
- .env
restart: unless-stopped
networks:
- wordpress
depends_on:
- wordpress
ports:
- "8080:80" # http
- "8443:443" # https
volumes:
- ${WORDPRESS_LOCAL_HOME:-./wordpress}:/var/www/html
- ${NGINX_CONF:-./nginx/default.conf}:/etc/nginx/conf.d/default.conf
- ${NGINX_SSL_CERTS:-./ssl}:/etc/ssl:ro
- ${NGINX_LOGS:-./logs/nginx}:/var/log/nginx
# adminer - bring up only as needed - bypasses nginx
# adminer:
# # default port 9000
# image: adminer:4-fastcgi
# container_name: wp-adminer
# restart: unless-stopped
# networks:
# - wordpress
# depends_on:
# - database
# ports:
# - "9000:9000"
networks:
wordpress:
name: wp-wordpress
driver: bridge