-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-sample.yml
137 lines (128 loc) · 3.64 KB
/
docker-compose-sample.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
129
130
131
132
133
134
135
136
version: '3.5'
services:
web:
container_name: web
# build: ./build/nginx-proxy
image: chrishsieh/nginx-proxy:latest
environment:
- DEFAULT_HOST=myapp.localtest.me
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- dhparam-volume:/etc/nginx/dhparam/
- ./setting/nginx/vhost.d/:/etc/nginx/vhost.d:ro
- ./setting/nginx/stream.d/:/etc/nginx/stream.d
- ./setting/nginx/proxy.conf:/etc/nginx/proxy.conf:ro
- ./setting/nginx/nginx.tmpl:/app/nginx.tmpl:ro
- ./keys/acme:/acmecerts #acme.sh install folder
- ./keys/certs:/etc/nginx/certs #certs folder
- ./setting/nginx/updatessl.sh:/app/prechk #if debug need disable this.
# - ./setting/nginx/updatessl-debug.sh:/app/prechk #debug use.
# - ./setting/nginx/Procfile-debug:/app/Procfile:ro #debug nginx mode.
- ./log/nginx:/var/log/nginx #log
restart: always
secrets:
- dns_api
- ssl
# network_mode: "host"
networks:
default:
#### setting for services call web server by host name
aliases:
- www.example.com
- www.example1.com
- myapp.localtest.me
- www.example2.com
db:
container_name: db
# build: ./build/mysql
image: chrishsieh/mysql:latest
volumes:
- db-volume:/var/lib/mysql
- ./setting/sql/sql_setup:/usr/local/prechk
secrets:
- crm_secrets
php:
container_name: php
# build: ./build/php-fpm
image: chrishsieh/php-fpm:latest
links:
- db
environment:
- MYSQL_DB_HOST=db
- LC_ALL=zh_TW ##### locale #####
- VIRTUAL_HOST=www.example.com ##### need modify #####
- VIRTUAL_PROTO=fastcgi
- VIRTUAL_ROOT=/var/www/CRM/src
- VIRTUAL_PORT=9000
- ENABLE_ACME=true
# - ENABLE_HSTS=true
# - DEBUG_MODE=true
volumes:
# - ./content/www:/var/www # php file debug
- content:/var/www
- ./setting/php/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./setting/php/crmsetup:/usr/local/prechk
# - ./log/php:/usr/local/var/log #debug use.
secrets:
- crm_secrets
php1:
container_name: php1
image: php:fpm-alpine
environment:
- VIRTUAL_HOST=www.example1.com
- VIRTUAL_PROTO=fastcgi
- VIRTUAL_ROOT=/var/www/html
- VIRTUAL_PORT=9000
- ENABLE_ACME=true
# - DEBUG_MODE=true
volumes:
- ./html:/var/www/html
php2:
container_name: php2
image: php:fpm-alpine
environment:
- VIRTUAL_HOST=myapp.localtest.me
- VIRTUAL_PROTO=fastcgi
- VIRTUAL_ROOT=/var/www/html
- VIRTUAL_PORT=9000
# - HTTPS_METHOD=nohttps
# - DEBUG_MODE=true
volumes:
- ./html:/var/www/html
php3:
container_name: php3
image: php:fpm-alpine
environment:
- VIRTUAL_HOST=www.example2.com
- VIRTUAL_PROTO=fastcgi
- VIRTUAL_ROOT=/var/www/html
- VIRTUAL_PORT=9000
- HTTPS_METHOD=nohttps
# - DEBUG_MODE=true
volumes:
- ./html:/var/www/html
# new_php_site:
# image: php:fpm-alpine
# environment:
# - VIRTUAL_HOST=www.example.com
# - VIRTUAL_PROTO=fastcgi
# - VIRTUAL_ROOT=/var/www/html
# - VIRTUAL_PORT=9000
# - ENABLE_ACME=true
# - DEBUG_MODE=true
# volumes:
# - ./html:/var/www/html
secrets:
crm_secrets:
file: ./secrets/crm_sql_secrets.json
dns_api:
file: ./secrets/dns_api.json ##### need modify #####
ssl:
file: ./secrets/ssl-sample.json ##### need modify #####
volumes:
db-volume: null
dhparam-volume: null
content: null