-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (40 loc) · 1.19 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
version: '3'
# Runs the Django development server, which is less than ideal in terms of
# replicating the deployment environment locally -- for which, the
# docker-compose-local.yml file is provided. However, due to lack of a good solution
# for static file development in a more deployment-like configuration, this
# current compose file is provided for development.
# web service mount to apps location so that development updates in the application
# are reflected in the container.
# Note: the db build will create the default postgres database and user. To
# create the application database, run `initdb.sh` after building.
services:
app:
restart: always
build: .
ports:
- "80:8000"
links:
- pg:pg
volumes:
- .:/usr/src/apps/cityhallmonitor
env_file: .env
environment:
DJANGO_DEBUG: 'true'
PYTHONPATH: .
command: ./manage.py runserver 0.0.0.0:8000
depends_on:
- pg
pg:
restart: always
image: postgres:11.6
environment:
PGDATABASE: cityhallmonitor
PGUSER: cityhallmonitor
PGPASSWORD: cityhallmonitor
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data/
volumes:
pgdata: