-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
36 lines (36 loc) · 1.01 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
version: '3'
services:
db:
build: './db'
container_name: 'db'
expose:
- 5432
ports:
- 1000:5432 # to check whether this is secure or not
volumes:
- ./db/data:/var/lib/postgresql/data:rw
environment:
- POSTGRES_USER=mf_admin # all environment variables to be moved
- POSTGRES_DB=melton_foundation
- POSTGRES_PASSWORD=mf_password
api:
build: './app'
container_name: 'api'
expose:
- 8000
volumes:
- ./staticfiles:/code/api/static/
command: [sh, -c, "python manage.py collectstatic --noinput && python manage.py migrate && gunicorn api.wsgi --bind 0.0.0.0:8000"]
depends_on:
- db
nginx:
build: './nginx'
container_name: 'nginx'
expose:
- 80
ports:
- "9000:80"
volumes:
- ./staticfiles:/static
depends_on:
- api