-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
45 lines (44 loc) · 1.21 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
version: '3'
services:
dataservice_pg:
container_name: dataservice_pg
image: postgres:11.1
env_file:
- .env
environment:
POSTGRES_DB: "${DATASERVICE_DB}"
POSTGRES_USER: "${DATASERVICE_DB_USER}"
POSTGRES_PASSWORD: "${DATASERVICE_DB_PASSWORD}"
ports:
- "5432:5432"
dataservice:
container_name: dataservice
build:
context: .
target: test
# command: /bin/ash -c "sleep 5; ./bin/run.sh"
command: /bin/ash -c "sleep 5; flask db upgrade; ./manage.py"
volumes:
- .:/app
ports:
- "5000:5000"
env_file:
- .env
environment:
FLASK_CONFIG: "${FLASK_CONFIG}"
FLASK_APP: "${FLASK_APP}"
# NOTE: Only set BIND_ALL_INTERFACES to enabled if running app within
# a docker container. Otherwise, you will make your app accessible to
# any IP that can reach machine via its public IP
BIND_ALL_INTERFACES: "enabled"
PG_HOST: dataservice_pg
PG_PORT: "${DATASERVICE_PG_PORT}"
PG_NAME: "${DATASERVICE_DB}"
PG_USER: "${DATASERVICE_DB_USER}"
PG_PASS: "${DATASERVICE_DB_PASSWORD}"
depends_on:
- dataservice_pg
networks:
default:
external:
name: kf-data-stack