-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
142 lines (142 loc) · 3.43 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
version: "3"
services:
app:
tty: true
build:
context: "app"
dockerfile: "Dockerfile"
environment:
- PORT=4000
depends_on:
- db
ports:
- 4000:4000
networks:
- openelections
volumes:
- ./app:/app
api:
tty: true # Enables debugging capabilities when attached to this container.
user: root
build:
context: "api"
dockerfile: "Dockerfile.development"
# command: ["./wait-for-it.sh", "db:5432", "redis:6379", "--", "npm", "run", "seedandrun"]
env_file:
- .env
environment:
- PORT=3000
- NODE_ENV=development
- SECRET_KEY=bananas
- DB_USERNAME=postgres
- DB_PASSWORD=password
- DB_NAME=open_elections_dev
- DB_HOST=db
- DB_PORT=5432
- SKIP_DB_WAIT=0
- SKIP_DB_MIGRATION=0
- SKIP_NPM_INSTALL=0
- SKIP_BOWER_INSTALL=0
- REDIS_URL=redis://redis:6379/0
- HOST_URL=openelectionsportland.org
- APP_ENV=development
depends_on:
- db
- redis
- data
ports:
- 3000:3000
volumes:
- ./api/controller:/app/controller
- ./api/models:/app/models
- ./api/routes:/app/routes
- ./api/services:/app/services
- ./api/test:/app/test
- ./api/types:/app/types
- ./api/jobs:/app/jobs
- ./api/.nvmrc:/app/.nvmrc
- ./api/app.ts:/app/app.ts
- ./api/package.json:/app/package.json
- ./api/tsconfig.json:/app/tsconfig.json
networks:
- openelections
jobs:
tty: true # Enables debugging capabilities when attached to this container.
user: root
build:
context: "api"
dockerfile: "Dockerfile.jobs"
env_file:
- .env
environment:
- PORT=3000
- NODE_ENV=development
- SECRET_KEY=bananas
- DB_USERNAME=postgres
- DB_PASSWORD=password
- DB_NAME=open_elections_dev
- DB_HOST=db
- DB_PORT=5432
- SKIP_DB_WAIT=0
- SKIP_DB_MIGRATION=0
- SKIP_NPM_INSTALL=0
- SKIP_BOWER_INSTALL=0
- REDIS_URL=redis://redis:6379/0
- HOST_URL=openelectionsportland.org
depends_on:
- db
- redis
- data
volumes:
- ./api/controller:/app/controller
- ./api/models:/app/models
- ./api/routes:/app/routes
- ./api/services:/app/services
- ./api/test:/app/test
- ./api/types:/app/types
- ./api/jobs:/app/jobs
- ./api/.nvmrc:/app/.nvmrc
- ./api/app.ts:/app/app.ts
- ./api/package.json:/app/package.json
- ./api/tsconfig.json:/app/tsconfig.json
networks:
- openelections
redis:
image: redis
ports: ["6379:6379"]
networks:
- openelections
db:
image: mdillon/postgis
ports: ["5432:5432"]
volumes:
- pgdata:/var/lib/postgresql/data
- ./pgdata/conf:/etc/postgresql/
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=open_elections_dev
networks:
- openelections
data:
build:
context: ./datascience
# volumes:
# - ./datascience:/app
ports: ["8080:80"]
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=open_elections_dev
- POSTGRES_PORT=5432
- POSTGRES_HOST=db
- FLASK_ENV=development
command: ["sh", "/app/openelections/api/start.sh"]
depends_on:
- db
networks:
- openelections
networks:
openelections:
volumes:
pgdata: