forked from GoodSpace-Kr/Teaming-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 1.06 KB
/
docker-compose.yml
File metadata and controls
46 lines (44 loc) · 1.06 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
services:
db:
image: mysql:8.0
container_name: teaming-db
command: >
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
TZ: ${TZ}
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -p$$MYSQL_ROOT_PASSWORD || exit 1"]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
volumes:
- db_data:/var/lib/mysql
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
app:
build: .
container_name: teaming-app
depends_on:
db:
condition: service_healthy
env_file:
- .env
ports:
- "8080:8080"
volumes:
- ${IMAGES_DIR:-./images}:/app/images
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
volumes:
db_data: