-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (58 loc) · 1.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (58 loc) · 1.36 KB
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
version: '3.1'
services:
db:
image: mysql
container_name: tdd
restart: always
ports:
- 3306:3306
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
networks:
- tdd-network
app:
image: junseok1204/tdd-0.0.1-snapshot
container_name: app-container
ports:
- 8080:8080
env_file:
- "./.env"
environment:
- TZ=Asis/Seoul
depends_on:
- db
links:
- db
networks:
- tdd-network
restart: always
nginx:
image: nginx:1.15-alpine
restart: unless-stopped
container_name: tdd-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/config:/etc/nginx/conf.d
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
networks:
- tdd-network
certbot:
image: certbot/certbot:latest
restart: unless-stopped
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
networks:
- tdd-network
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
tdd-network:
volumes:
mysql-data: