-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yaml
51 lines (47 loc) · 1.19 KB
/
docker-compose.yaml
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
47
48
49
50
51
version: '3'
services:
datahub-be:
# restart: always
build: .
command: >
sh -c "python manage.py makemigrations &&
python manage.py migrate &&
python manage.py loaddata db_scripts/userrole_fixture.yaml &&
python manage.py loaddata db_scripts/initial_data.yaml && python manage.py runserver 0.0.0.0:8000"
# image: farmstack/datahub-be:local
# container_name: datahub-be
ports:
- "8000:8000"
depends_on:
- db
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
SENDGRID_API_KEY: {your sendgrid key}
EMAIL_HOST_USER: {your sendgrid registered email}
links:
- db:db
networks:
- postgresql-network
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- "POSTGRES_HOST_AUTH_METHOD=trust"
hostname: postgres
ports:
- '5432:5432'
networks:
- postgresql-network
volumes:
db_data:
driver: local
networks:
postgresql-network:
driver: bridge