-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
93 lines (86 loc) · 2.33 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
version: "2"
services:
####################### Keycloak Definition #######################
keycloak:
restart: always
container_name: mds_keycloak
image: jboss/keycloak
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- KEYCLOAK_IMPORT=/tmp/keycloak-local-realm.json
- DB_VENDOR=h2
volumes:
- ./openshift/scripts/keycloak-local-realm.json:/tmp/keycloak-local-realm.json
- ./openshift/scripts/keycloak-local-user.sh:/tmp/keycloak-local-user.sh
ports:
- "8080:8080"
- "8443:8443"
networks:
- mds
####################### Postgres Definition #######################
postgres:
restart: always
container_name: mds_postgres
build:
context: migrations
dockerfile: Dockerfile.dev
environment:
- POSTGRES_USER=mds
- POSTGRES_PASSWORD=test
- POSTGRES_DB=mds
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- mds
####################### Flyway Migration Definition #######################
flyway:
container_name: mds_flyway
image: boxfuse/flyway:5.2.3-alpine
command: -url=jdbc:postgresql://postgres/mds -user=mds -password=test -connectRetries=60 migrate
volumes:
- ./migrations/sql:/flyway/sql
depends_on:
- postgres
networks:
- mds
####################### Backend Definition #######################
backend:
restart: always
container_name: mds_backend
build:
context: python-backend
ports:
- 5000:5000
volumes:
- ./python-backend/:/app/
depends_on:
- flyway
# Export environment variables from .env into the container environment
entrypoint: ["bash", "-c", "grep -v '^#' .env | xargs ; flask run"]
networks:
- mds
####################### Frontend Definition #######################
frontend:
restart: always
container_name: mds_frontend
build:
context: frontend
command: ["npm", "run", "serve"]
volumes:
- ./frontend/src/:/app/src/
ports:
- 3000:3000
depends_on:
- backend
networks:
- mds
####################### Networks Definition #######################
networks:
mds:
driver: "bridge"
####################### Volumes Definition #######################
volumes:
postgres-data: