-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
46 lines (46 loc) · 1.11 KB
/
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
46
# TODO: refactor all docker-compose files and dockerfiles
version: '3'
services:
# only used for development:
nginx:
restart: always
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- '3000:80'
client:
build:
dockerfile: Dockerfile.dev
context: ./digitalace-frontend
volumes:
# - /app/node_modules
- ./digitalace-frontend:/app
# only used for development, testing:
api:
build:
dockerfile: Dockerfile.dev
context: ./digitalace-backend
volumes:
- ./digitalace-backend:/app
ports:
- '5000:5000'
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:5000"
environment:
- PGHOST=db
- PGDATABASE=digitalace_db
- PGUSER=postgres
- PGPASSWORD=postgres_password
depends_on:
- db
db:
image: 'postgres:latest'
environment:
- POSTGRES_DB=digitalace_db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres_password
volumes:
- ./pgdata:/var/lib/postgresql/data