forked from DemocracyLab/CivicTechExchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (70 loc) · 1.88 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.7'
services:
db:
image: postgis/postgis
env_file:
- ./.env
ports:
- "5432:5432"
volumes:
- demolab:/var/lib/postgresql/data/
- ./civictechprojects/:/code/civictechprojects/
- ./common/:/code/common/
- ./democracylab/:/code/democracylab/
- ./oauth2/:/code/oauth2/
- ./.babelrc:/code/.babelrc
- ./manage.py:/code/manage.py
- ./webpack.common.js:/code/webpack.common.js
- ./webpack.dev.js:/code/webpack.dev.js
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
create_table:
build: .
env_file:
- ./.env
command: python manage.py createcachetable
depends_on:
db:
condition: service_healthy
migrate:
build: .
env_file:
- ./.env
command: python manage.py migrate
volumes:
- ./civictechprojects/:/code/civictechprojects/
- ./common/:/code/common/
- ./democracylab/:/code/democracylab/
- ./oauth2/:/code/oauth2/
- ./.babelrc:/code/.babelrc
- ./manage.py:/code/manage.py
- ./webpack.common.js:/code/webpack.common.js
- ./webpack.dev.js:/code/webpack.dev.js
depends_on:
- create_table
web:
build: .
env_file:
- ./.env
command: bash -c '. /.nvm/nvm.sh use default &&
npm run dev &&
python manage.py runserver 0.0.0.0:8000'
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- ./civictechprojects/:/code/civictechprojects/
- ./common/:/code/common/
- ./democracylab/:/code/democracylab/
- ./oauth2/:/code/oauth2/
- ./.babelrc:/code/.babelrc
- ./manage.py:/code/manage.py
- ./webpack.common.js:/code/webpack.common.js
- ./webpack.dev.js:/code/webpack.dev.js
volumes:
demolab: