-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-production.yml
95 lines (87 loc) · 2.26 KB
/
docker-compose-production.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
# PRODUCTION DOCKER-COMPOSE FILE
version: "2"
services:
# Https >>>>>
proxy:
image: jwilder/nginx-proxy
ports:
- 80:80
- 443:443
volumes:
- ./configs/proxy/conf.d:/etc/nginx/conf.d
- ./configs/proxy/vhost.d:/etc/nginx/vhost.d
- ./configs/proxy/html:/usr/share/nginx/html
- ./configs/proxy/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
restart: always
# Letsencrypt
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes_from:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./configs/proxy/certs:/etc/nginx/certs:rw
restart: always
# <<<<< Https
http_server:
image: nginx:1.13.3-alpine
restart: always
links:
- wp_server
volumes:
- ./www/wp_files/:/www:ro
- ./configs/nginx/conf/nginx.conf:/etc/nginx/conf/nginx.conf:ro
- ./configs/nginx/conf.d:/etc/nginx/conf.d:ro
# The user must provied this env variables before run docker-compose up
# The command would be
# export DOMAIN=your-domain.com && export EMAIL = [email protected] && docker-compose up
environment:
- VIRTUAL_HOST=${DOMAIN}
- VIRTUAL_NETWORK=nginx-proxy
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=${DOMAIN}
- LETSENCRYPT_EMAIL=${EMAIL}
networks:
- proxy-tier
- default
wp_server:
restart: always
build:
context: ./docker-images/php/
args:
PHP_VERSION: 7.1
# PHP_VERSION: 7.0
# PHP_VERSION: 5.6
volumes:
- ./www/wp_files/:/www
- ./configs/php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
links:
- mariadb
mariadb:
image: mariadb
restart: always
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./www/wp_DB:/var/lib/mysql
# The user must provied this env variables before run docker-compose up
# The command would be
# export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && docker-compose up
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASS}
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: on-failure
environment:
- PMA_HOST=mariadb
links:
- mariadb
ports:
- "8888:80"
networks:
proxy-tier:
external:
name: nginx-proxy