-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
62 lines (56 loc) Β· 1.2 KB
/
docker-compose.dev.yml
File metadata and controls
62 lines (56 loc) Β· 1.2 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
services:
mysql:
image: mysql:8.0
restart: always
env_file:
- .env.dev
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: resttest_mysql
MYSQL_USER: resttest_official
MYSQL_PASSWORD: resttest!@#20250331
ports:
- "3307:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7
container_name: redis-dev
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
fastapi:
build:
context: .
args:
MODE: dev
container_name: resttest-dev
image: resttest-server
command: uvicorn main:app --host 0.0.0.0 --port 8080 --reload
restart: always
ports:
- "8080:8080"
env_file:
- .env.dev
environment:
- MODE=dev
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
- ./:/code
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
volumes:
mysql-data: