-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
45 lines (41 loc) · 928 Bytes
/
docker-compose.yml
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
version: "3.9"
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
environment:
# Set env vars correct
DATABASE_URL: postgres://app_user:changeme@postgres/app_db
DJANGO_SUPERUSER_USERNAME: django
DJANGO_SUPERUSER_PASSWORD: django
DJANGO_SUPERUSER_EMAIL: django@django.com
SECRET_KEY: ChangeToASecureSecret
ALLOWED_HOSTS: localhost,127.0.0.1
DEBUG: "False"
networks:
- backend
- frontend
depends_on:
- postgres
postgres:
restart: always
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data/
environment:
POSTGRES_DB: app_db
POSTGRES_USER: app_user
POSTGRES_PASSWORD: changeme
networks:
- backend
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
pgdata: null