-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
91 lines (87 loc) · 2.34 KB
/
docker-compose.dev.yml
File metadata and controls
91 lines (87 loc) · 2.34 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
services:
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx.dev.conf:/etc/nginx/nginx.conf
depends_on:
client:
condition: service_healthy
restart: true
server:
condition: service_healthy
restart: true
client:
build:
context: ./client
dockerfile: Dockerfile.dev
ports:
- 3000:3000
environment:
- NEXT_PUBLIC_BASE_URL=${NEXT_PUBLIC_BASE_URL?REQUIRED}
- BASE_API_URL=${BASE_API_URL?REQUIRED}
- ENABLE_HOT_RELOAD_POLLING=${ENABLE_HOT_RELOAD_POLLING}
volumes:
- ./client:/app
- /app/node_modules
depends_on:
server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
retries: 10
start_period: 10s
timeout: 5s
server:
build:
context: ./server
dockerfile: Dockerfile.dev
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_USER=${DB_USER?REQUIRED}
- DB_PASSWORD=${DB_PASSWORD?REQUIRED}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID?REQUIRED}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET?REQUIRED}
- OAUTHLIB_INSECURE_TRANSPORT=1
- ALLOWED_HOSTS=${ALLOWED_HOSTS?REQUIRED}
- FRONTEND_URL=${FRONTEND_URL?REQUIRED}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY?REQUIRED}
- REDIRECT_URI=${REDIRECT_URI?REQUIRED}
- DEBUG=true
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID?REQUIRED}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY?REQUIRED}
- AWS_REGION=${AWS_REGION?REQUIRED}
depends_on:
db:
condition: service_healthy
ports:
- 8000:8000
volumes:
- ./server:/app
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/core/health"]
interval: 30s
retries: 10
start_period: 10s
timeout: 5s
db:
image: postgres:16-alpine
restart: always
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD?REQUIRED}
- POSTGRES_USER=${DB_USER?REQUIRED}
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- course_scheduling_db_data:/var/lib/postgresql/data
- ./createdb.sql:/docker-entrypoint-initdb.d/createdb.sql
volumes:
course_scheduling_db_data: