-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.yml
44 lines (40 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
37
38
39
40
41
42
43
44
version: '3.6'
services:
covid-green-db:
container_name: covid-green-db
image: postgres:10.4-alpine
environment:
- POSTGRES_USER=contact_tracing
- POSTGRES_PASSWORD=contact_tracing
- POSTGRES_DB=contact_tracing
ports:
- 5432:5432
volumes:
- covid-green-pg-data:/var/lib/postgresql/data
covid-green-db-migrations:
container_name: covid-green-db-migrations
build:
context: .
dockerfile: Dockerfile-migrate
environment:
- DB_HOST=covid-green-db
- DB_READ_HOST=covid-green-db
volumes:
- ${PWD}:/covid-green
command: ["npm","run","db:migrate:until-done"]
covid-green-api:
container_name: covid-green-api
build:
context: .
dockerfile: Dockerfile-api
environment:
- DB_HOST=covid-green-db
- DB_READ_HOST=covid-green-db
ports:
- 5000:5000
volumes:
- ${PWD}:/covid-green
command: ["npm","run","api:start:dev:when-ready"]
volumes:
covid-green-pg-data:
external: false