-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 1.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (64 loc) · 1.51 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
version: '3.8'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: studyquest-backend
ports:
- "8000:8000"
env_file:
- ./backend/.env
environment:
- PYTHONUNBUFFERED=1
networks:
- studyquest-network
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: on-failure:3
depends_on:
- frontend
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: studyquest-frontend
ports:
- "3000:3000"
env_file:
- ./frontend/.env.local
environment:
- NODE_ENV=production
- NEXT_PUBLIC_BACKEND_URL=http://backend:8000
networks:
- studyquest-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: on-failure:3
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.25'
memory: 128M
networks:
studyquest-network:
driver: bridge