-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
40 lines (38 loc) · 963 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
version: "3.8"
services:
postgres:
image: postgres:12.2
ports:
- 5432:5432
environment:
- POSTGRES_DB=${DB_NAME:-djangodb}
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- django-swarm-example_postgres-data:/var/lib/postgresql/data
redis:
image: redis:6-alpine
ports:
- 6379:6379
django:
build:
context: .
dockerfile: ./development/Dockerfile
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./app:/usr/src/app/
ports:
- 8000:8000
environment:
- DEBUG=${DEBUG:-1}
- SECRET_KEY=${SECRET_KEY:-}
- DB_NAME=${DB_NAME:-djangodb}
- DB_HOST=${DB_HOST:-172.17.0.1}
- DB_USER=${DB_USER:-postgres}
- DB_PASSWORD=${DB_PASSWORD:-}
- DB_PORT=${DB_PORT:-5432}
- REDIS_URI=${REDIS_URI:-redis:6379/1}
depends_on:
- postgres
- redis
volumes:
django-swarm-example_postgres-data: