-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
executable file
·55 lines (54 loc) · 1.48 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
version: "3"
services:
php:
build:
context: .
dockerfile: data/php/Dockerfile
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ./data/php:/var/www/certbot/phpDir/:rw
- ./data/certbot/www:/var/www/certbot/
expose:
- 9000
networks:
- default
nginx:
image: nginx:1.15-alpine
expose:
- "80"
- "443"
ports:
- "80:80"
- "443:443"
networks:
- default
volumes:
- ./data/nginx:/etc/nginx/conf.d/:rw
- ./data/php:/var/www/certbot/phpDir/:rw
- ./data/certbot/conf:/etc/letsencrypt/:rw
- ./data/certbot/www:/var/www/certbot/:rw
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
mysql:
image: mysql:8.0.20
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./data/db_app:/var/lib/mysql:rw
environment:
MYSQL_ROOT_PASSWORD: Pass
MYSQL_DATABASE: DB_Name
MYSQL_USER: DB_user
MYSQL_PASSWORD: User_pass
ports:
- "3306:3306"
networks:
- default
##############################
# Certbot Container
##############################
certbot:
image: certbot/certbot:latest
volumes:
- ./data/certbot/conf:/etc/letsencrypt/:rw
- ./data/certbot/www:/var/www/certbot/:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"