-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (74 loc) · 2.38 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
version: '3.5'
services:
web:
container_name: web
image: chrishsieh/nginx-proxy:latest
environment:
- DEFAULT_HOST=${_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
- ${_CERTS_FOLDER:-./keys}/acme:/acmecerts #acme.sh install folder
- ${_CERTS_FOLDER:-./keys}/certs:/etc/nginx/certs #certs folder
- ./setting/nginx/updatessl.sh:/app/prechk
- ${_LOG_FOLDER:-./log}/nginx:/var/log/nginx #log
restart: always
secrets:
- dns_api
- ssl
networks:
default:
#### setting for services call web server by host name
aliases:
- ${_VIRTUAL_HOST:-myapp.localtest.me}
db:
container_name: db
image: chrishsieh/mysql:latest
volumes:
- db-volume:/var/lib/mysql
- ./setting/sql/pre-init/:/scripts/pre-init.d/
secrets:
- crm_secrets
php:
container_name: php
image: chrishsieh/php-fpm:alpine-latest
links:
- db
environment:
- MYSQL_DB_HOST=db
- LC_ALL=${_ALPINE_LC_ALL:-en_US}
##### RELEASE_VERSION avaiable value: latest, 3.1.0
- RELEASE_VERSION=${_CRM_VERSION:-latest}
- VIRTUAL_HOST=${_VIRTUAL_HOST:-myapp.localtest.me}
- VIRTUAL_PROTO=fastcgi
- VIRTUAL_ROOT=/var/www/CRM/churchcrm
- VIRTUAL_PORT=9000
- ENABLE_ACME=${_ENABLE_ACME:-false} ##### letsencrypt setting
- ENABLE_HSTS=${_ENABLE_HSTS:-false}
volumes:
- default-volume:/var/www
- php-volume:/var/www/CRM/churchcrm ##### php code
- ./setting/php/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
- ./setting/php/crmsetup:/run.d/10-setup.sh
- ${_LOG_FOLDER:-./log}/php:/usr/local/var/log #### log
secrets:
- crm_secrets
secrets:
crm_secrets:
file: ${_CRM_SRCRETS:-./secrets/crm_sql_secrets.json}
dns_api:
file: ${_DNS_API_SRCRETS:-./secrets/dns_api.json}
ssl:
file: ${_SSL_SRCRETS:-./secrets/ssl.json}
volumes:
db-volume:
dhparam-volume:
default-volume:
php-volume: