-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
65 lines (62 loc) · 1.58 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
version: "3.9"
services:
db:
container_name: buildingmotif-db
image: postgres
volumes:
- buildingmotif-db:/var/lib/postgresql/data
environment:
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_DB=${POSTGRES_DB}"
ports:
- target: 5432
published: 5432
protocol: tcp
mode: host
healthcheck:
test: ["CMD", "pg_isready", "-d", "${DB_URI}"]
interval: 10s
timeout: 30s
retries: 5
start_period: 5s
api:
container_name: buildingmotif-api
environment:
- "DB_URI=${DB_URI}"
depends_on: # require that the db is up and listening
db:
condition: service_healthy
build:
context: .
dockerfile: buildingmotif/api/Dockerfile
image: buildingmotif-api:latest
# UNCOMMENT this if you want to preserve local builds for debugging
volumes:
- type: bind
source: ./buildingmotif
target: /opt/buildingmotif
ports:
- target: 5000
published: 5000
protocol: tcp
mode: host
app:
container_name: buildingmotif-app
depends_on: # require that the api server has started
- api
build: ./buildingmotif-app
image: buildingmotif-app:latest
# UNCOMMENT this if you want to preserve local builds for debugging
volumes:
- type: bind
source: ./buildingmotif-app
target: /buildingmotif-app
ports:
- target: 4200
published: 4200
protocol: tcp
mode: host
volumes:
buildingmotif-db:
external: true