-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
46 lines (43 loc) · 1.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
services:
db:
image: postgres:17
environment:
POSTGRES_DB: course_management
POSTGRES_USER: course_user
POSTGRES_PASSWORD: course_password
command: postgres -c wal_level=logical
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U course_user -d course_management"]
interval: 5s
timeout: 5s
retries: 5
ngrok:
image: ngrok/ngrok:latest
container_name: ngrok
restart: unless-stopped
environment:
NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN}
command: 'tcp db:5432'
ports:
- "4040:4040"
web:
build: .
ports:
- "8000:80"
environment:
DATABASE_URL: postgresql://course_user:course_password@db:5432/course_management
DEBUG: "1"
IS_LOCAL: "1"
SECRET_KEY: "dev-secret-key-change-in-production"
volumes:
- init_flag:/code/.docker
depends_on:
db:
condition: service_healthy
entrypoint: ["/code/docker-entrypoint.sh"]
command: ["gunicorn", "course_management.wsgi", "--bind", "0.0.0.0:80"]
volumes:
postgres_data:
init_flag: