forked from Volontaria/API-Volontaria
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (35 loc) · 822 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (35 loc) · 822 Bytes
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
services:
postgres:
image: postgres:latest
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
web:
restart: always
env_file: .env
environment:
- DJANGO_SECRET_KEY=${SECRET_KEY}
image: web
build:
context: ./api
command: >
bash -c "python wait_for_postgres.py &&
./manage.py migrate &&
./manage.py collectstatic --noinput &&
./manage.py runserver --insecure 0.0.0.0:8000"
volumes:
- ./api:/api
ports:
- "8000:8000"
depends_on:
- postgres
documentation:
image: minidocks/mkdocs:latest
restart: always
command: "mkdocs serve"
volumes:
- ./documentation:/code
working_dir: /code
ports:
- "8010:8010"