-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
51 lines (48 loc) · 1.21 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
51 lines (48 loc) · 1.21 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
services:
redis:
image: redis:7.2.4-alpine3.19
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD:-localdev}
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-localdev}"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-localdev}", "ping"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: Dockerfile.dev
network: host
command: /bin/sh -c "uvicorn api.api:app --host 0.0.0.0 --port $PORT --reload"
volumes:
- ./api:/app/api
- ./requirements.txt:/app/requirements.txt
ports:
- "${PORT:-8000}:${PORT:-8000}"
environment:
- PORT=${PORT:-8000}
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-localdev}
depends_on:
redis:
condition: service_healthy
frontend:
build:
context: .
dockerfile: Dockerfile.frontend.dev
network: host
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "${FRONTEND_PORT:-5173}:5173"
environment:
- VITE_API_URL=http://localhost:${PORT:-8000}/api/v1
depends_on:
- api
volumes:
redis-data: