-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
72 lines (66 loc) · 1.58 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
version: "3.9"
name: "biseo"
services:
web:
container_name: biseo-web
image: ghcr.io/sparcs-kaist/biseo-web:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: always
ports:
- "${EXPOSE_PORT:?}:80"
environment:
- SERVER_URI="http://api:8000"
depends_on:
- api
networks:
- frontend
api:
container_name: biseo-api
image: ghcr.io/sparcs-kaist/biseo-api:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: always
environment:
- NODE_ENV=production
- SERVER_PORT=8000
- DATABASE_URL=mysql://root:${DB_PASSWORD}@db:3306/${DB_NAME}
- SECRET_KEY=${SECRET_KEY}
- GOOGLE_CLIENT=${GOOGLE_CLIENT}
- GOOGLE_SECRET=${GOOGLE_SECRET}
depends_on:
- db
networks:
- frontend
- backend
db:
image: mysql:8.0
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
volumes:
- biseo-data:/var/lib/mysql
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
networks:
- backend
healthcheck:
test: "mysql -uroot -p$$MYSQL_ROOT_PASSWORD $$MYSQL_DATABASE -e 'select 1'"
interval: 1s
retries: 3
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
volumes:
biseo-data:
external: true
networks:
frontend:
backend: