-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.16 KB
/
docker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.16 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
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: app
ports:
- "8000:8000"
volumes:
- ./src:/home/Jamiron_BE/src
command: uvicorn src.app.main:app --host 0.0.0.0 --port 8000
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
redis:
image: redis:7-alpine
container_name: redis
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis_data:/data
ports:
- "6379:6379"
mysql:
image: mysql:8.4
container_name: mysql
environment:
TZ: Asia/Seoul
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
command:
- mysqld
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
volumes:
- mysql_data:/var/lib/mysql
ports:
- "3306:3306"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-p${MYSQL_ROOT_PASSWORD}" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
mysql_data:
redis_data: