-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
104 lines (95 loc) · 3.03 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
version: "3"
services:
web:
image: nginx:mainline-alpine
ports:
- 80:80
- 443:443
volumes:
- ${WWW_ROOT}:/var/www/html:cached
- ./conf/nginx/:/etc/nginx/conf.d/
- certs-vol:/certs:ro
depends_on:
- phpmyadmin
environment:
- HOST_NAME=${HOST_NAME}
command: /bin/sh -c "envsubst < /etc/nginx/conf.d/templates/server_name.template > /etc/nginx/conf.d/server_name.active && nginx -g 'daemon off;'"
networks:
- internal-network
restart: always
php:
build: ./Dockerfiles/php8fpm
volumes:
- ${WWW_ROOT}:/var/www/html:cached
- ./conf/php/conf.ini:/usr/local/etc/php/conf.d/conf.ini
networks:
- internal-network
environment:
- TZ=${TZ}
restart: always
db:
image: mariadb:11.3
restart: always
volumes:
- db-vol:/var/lib/mysql:cached
- ../dbbackup:/dbbackup:cached
- ./data/db:/db
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_BACKUP_PASSWORD: ${MYSQL_BACKUP_PASSWORD}
MYSQL_BACKUP_USER: ${MYSQL_BACKUP_USER}
networks:
- internal-network
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
- PMA_HOST=db
- PMA_ABSOLUTE_URI=https://${PMA_HOST}/pma/
restart: always
depends_on:
- db
networks:
- internal-network
redis:
image: redis:alpine
restart: always
volumes:
- redis-vol:/data/
networks:
- internal-network
acme:
build: ./Dockerfiles/acme
volumes:
- certs-vol:/certs
- ./Dockerfiles/acme/run.sh:/run.sh
- ./Dockerfiles/acme/updatecert:/etc/periodic/daily/updatecert
- /var/run/docker.sock:/var/run/docker.sock
- ${WWW_ROOT}:/var/www:cached
- ./Dockerfiles/acme/ssl-example:/dummyssl
restart: always
entrypoint: ""
command: /bin/sh -c 'chmod +x /run.sh && chmod 0744 /etc/periodic/daily/updatecert && crond -f'
environment:
- HOST_NAME=${HOST_NAME} # used for self signed certificate
- LETSENCRYPT_DOMAINS=${LETSENCRYPT_DOMAINS}
- EMAIL=${EMAIL}
- SELF_SIGNED=${SELF_SIGNED}
- LETSENCRYPT=${LETSENCRYPT}
- TZ=${TZ}
- DOCKER_API_VERSION=${DOCKER_API_VERSION}
- DYNDNS_PROVIDER=${DYNDNS_PROVIDER}
- DEDYN_TOKEN=${DEDYN_TOKEN}
- DEDYN_NAME=${DEDYN_NAME}
networks:
- internal-network
networks:
internal-network:
driver: bridge
volumes:
redis-vol:
certs-vol:
db-vol: