forked from kadenbarlow/django-postgres-graphql-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (35 loc) · 847 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
version: '3'
services:
web:
build:
context: .
command: ['./scripts/wait-for-postgres.sh', 'postgres', './scripts/start-app.sh']
tty: true
volumes:
- .:/app
ports:
- "8000:8000"
depends_on:
- postgres
environment:
DJANGO_SETTINGS_MODULE: settings.local
DATABASE_NAME: app
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USER: postgres
DATABASE_PASSWORD: docker
SECRET_KEY: m#vqw87h5gr@6xg2_1*-=af6!qslhwz6r)zva3li0gltpw8s(w
postgres:
image: postgres
restart: always
ports:
- '5432:5432'
volumes:
- postgres:/var/lib/postgresql/data
# To use a local directory instead:
# - ./postgres:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: docker
POSTGRES_DB: app
volumes:
postgres: