-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (32 loc) · 816 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (32 loc) · 816 Bytes
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
version: '3.8'
services:
web:
build: .
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000
volumes:
- .:/app
ports:
- "8000:8000"
env_file:
- .env
environment:
- DEBUG=${DEBUG:-True}
- SECRET_KEY=${SECRET_KEY}
- DATABASE_URL=postgres://${POSTGRES_USER:-weatheruser}:${POSTGRES_PASSWORD:-weatherpass}@db:5432/${POSTGRES_DB:-weatherdb}
- ALLOWED_HOSTS=*
depends_on:
- db
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env
environment:
- POSTGRES_DB=${POSTGRES_DB:-weatherdb}
- POSTGRES_USER=${POSTGRES_USER:-weatheruser}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-weatherpass}
ports:
- "5432:5432"
volumes:
postgres_data: