-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
128 lines (121 loc) · 3.63 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
version: '3.5'
services:
reverse-proxy:
image: nbmaiti/nginx-proxy:latest
container_name: reverse-proxy
restart: always
depends_on:
- nginx-wordpress
ports:
- "80:80"
- "443:443"
environment:
# Uncomment to enable multiple nginx-proxy instances
# e.g. to use with docker-compose-testing.yml
- HTTPS_PASSTHROUGH_PORT=444
- HTTPS_METHOD=${HTTPS_METHOD:-nohttp}
labels:
- reverse-proxy.nginx-proxy=true
volumes:
- ${NGINX_PROXY_CONF_DIR:-./nginx}/vhost:/etc/nginx/vhost.d:rw
- ${NGINX_PROXY_CONF_DIR:-./nginx}/html:/usr/share/nginx/html
- ${NGINX_PROXY_CONF_DIR:-./nginx}/dhparam:/etc/nginx/dhparam
- ${SSL_CERTS_DIR:-./nginx/certs}:/etc/nginx/certs:rw
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- frontend
letsencrypt:
image: nbmaiti/letsencrypt-nginx-proxy-companion:latest
container_name: letsencrypt
restart: always
depends_on:
- reverse-proxy
environment:
- DEFAULT_EMAIL=${DEFAULT_EMAIL:[email protected]}
- NGINX_PROXY_CONTAINER_LABEL=reverse-proxy.nginx-proxy
- NGINX_DOCKER_GEN_CONTAINER=reverse-proxy.nginx-proxy
volumes:
- ${LETSENCRYPT_ACME_DIR:-./acme}:/etc/acme.sh
- ${NGINX_PROXY_CONF_DIR:-./nginx}/html:/usr/share/nginx/html
- ${SSL_CERTS_DIR:-./nginx/certs}:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- frontend
wordpress:
image: wordpress:${WORDPRESS_VERSION:-php7.3-fpm-alpine}
container_name: wordpress
volumes:
- ./config/php-ini-overrides.ini:/usr/local/etc/php/conf.d/conf.ini
- ./wordpress:/var/www/html
environment:
- WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME:-wordpress}
- WORDPRESS_TABLE_PREFIX=${WORDPRESS_TABLE_PREFIX:-wp_}
- WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST:-mysql}
- WORDPRESS_DB_USER=${WORDPRESS_DB_USER:-root}
- WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password}
depends_on:
- mysql
restart: always
networks:
- frontend
- backend
mysql:
image: nbmaiti/alpine-mariadb:${MARIADB_VERSION:-latest}
container_name: mysql
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}
- MYSQL_USER=${MYSQL_USER:-root}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}
- MYSQL_DATABASE=${MYSQL_DATABASE:-wordpress}
restart: always
networks:
- backend
nginx-wordpress:
image: nginx:${NGINX_VERSION:-latest}
container_name: nginx-wordprees
depends_on:
- reverse-proxy
environment:
- VIRTUAL_HOST=${VIRTUAL_HOST:-xyz.abc.com}
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=${VIRTUAL_HOST:-xyz.abc.com}
# - LETSENCRYPT_HOST=${LETSENCRYPT_HOST:-xyz.abc.com}
- LETSENCRYPT_DNS_MODE=$LETSENCRYPT_DNS_MODE
- LETSENCRYPT_DNS_MODE_SETTINGS=$LETSENCRYPT_DNS_MODE_SETTINGS
volumes:
- ${NGINX_CONF_DIR:-./nginx}:/etc/nginx/conf.d
- ${NGINX_LOG_DIR:-./logs/nginx}:/var/log/nginx
- ${WORDPRESS_DATA_DIR:-./wordpress}:/var/www/html
depends_on:
- wordpress
restart: always
networks:
- frontend
- backend
adminer:
image: adminer
restart: always
links:
- mysql
ports:
- 8080:8080
networks:
- frontend
- backend
ddclient:
image: nbmaiti/ddclient
container_name: ddclient
hostname: ddclient
restart: always
volumes:
- ./ddclient-config:/config
networks:
- frontend
networks:
backend:
name: website
internal: true
frontend:
driver: bridge