-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
96 lines (90 loc) · 2.12 KB
/
docker-compose.dev.yml
File metadata and controls
96 lines (90 loc) · 2.12 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
services:
web:
build:
context: .
dockerfile: apps/web/Dockerfile
target: development
ports:
- "5173:5173"
environment:
- NODE_ENV=development
- VITE_API_URL=http://localhost:3000
- VITE_RECOMMENDATION_API_URL=http://localhost:8000
volumes:
- ./apps/web:/app
- /app/node_modules
networks:
- openlearn-network
restart: unless-stopped
api:
build:
context: .
dockerfile: apps/api/Dockerfile
target: development
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:password@postgres:5432/openlearn}
- JWT_SECRET=${JWT_SECRET:-dev-secret-key}
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@example.com}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123}
volumes:
- ./apps/api:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
networks:
- openlearn-network
restart: unless-stopped
recommendation-api:
build:
context: ./apps/recommendation-api
dockerfile: Dockerfile
target: development
ports:
- "8000:8000"
environment:
- PYTHONPATH=/app
- HOST=0.0.0.0
- PORT=8000
- DEBUG=true
volumes:
- ./apps/recommendation-api:/app
networks:
- openlearn-network
restart: unless-stopped
postgres:
image: postgres:15-alpine
ports:
- "5432"
environment:
- POSTGRES_DB=${POSTGRES_DB:-openlearn}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- openlearn-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379"
volumes:
- redis-data:/data
networks:
- openlearn-network
restart: unless-stopped
networks:
openlearn-network:
driver: bridge
volumes:
postgres-data:
redis-data: