-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
87 lines (85 loc) · 2.03 KB
/
docker-compose.yaml
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
name: bus-seats-dev
networks:
backend:
driver: bridge
proxy:
driver: bridge
services:
talkka-client:
build: ./client
image: shd2768/talkka-client
container_name: talkka-client
ports:
- "3000:3000"
environment:
- TZ=Asia/Seoul
networks:
- backend
- proxy
mysql:
image: mysql:8.0
container_name: bus-mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- TZ=Asia/Seoul
env_file:
- .env
volumes:
- ./data/mysql-data:/var/lib/mysql
- ./data/mysql-files:/var/lib/mysql-files
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --lower_case_table_names=1
networks:
- backend
talkka-server:
image: shd2768/talkka-server:1.0
container_name: talkka-server
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: ${MYSQL_URL}
SPRING_DATASOURCE_USERNAME: ${MYSQL_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD}
env_file:
- .env
depends_on:
- mysql
networks:
- backend
- proxy
nginx:
image: nginx:latest
container_name: nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./conf/nginx.conf:/etc/nginx/conf.d/default.conf
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
environment:
- TZ=Asia/Seoul
depends_on:
- mysql
- talkka-server
networks:
- proxy
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
certbot:
container_name: certbot
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- nginx
networks:
- proxy
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"