-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-ops.yaml
95 lines (84 loc) · 2.35 KB
/
docker-compose-ops.yaml
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
version: "3.8"
services:
build-api:
extends:
file: docker-compose.yaml
service: api-base
build:
context: ./patient-portal/
dockerfile: ./Dockerfile
restart: "no"
demo-data:
extends:
file: docker-compose.yaml
service: mysql
volumes:
- demo_sql_files:/sql
command: sh -c "mysql -v --host mysql -u ${MARIADB_USER} -p${MARIADB_PASSWORD} ${MARIADB_DATABASE} < /sql/load-data-demo.sql"
delete-all-data:
extends:
file: docker-compose.yaml
service: mysql
volumes:
- demo_sql_files:/sql
command: sh -c "mysql -v --host mysql -u ${MARIADB_USER} -p${MARIADB_PASSWORD} ${MARIADB_DATABASE} < /sql/delete-all-data.sql"
ui-dev:
image: patient-portal-ui-dev-image:latest
build:
context: ./patient-portal-ui
dockerfile: Dockerfile-dev
ports:
- 3001:80
volumes:
- ui_files:/app
environment:
- WATCHPACK_POLLING=true
#- CHOKIDAR_USEPOLLING=true to understand if it is really needed
working_dir: /app
build-ui-dev:
extends:
service: ui-dev
command: ["npm", "run", "build"]
init-api:
extends:
file: docker-compose.yaml
service: api-base
restart: "no"
command: ["java", "-jar", "patientportal-0.0.1-SNAPSHOT.jar", "--spring.profiles.active=init"]
update-api:
extends:
file: docker-compose.yaml
service: api-base
restart: "no"
command: ["java", "-jar", "patientportal-0.0.1-SNAPSHOT.jar", "--spring.profiles.active=update"]
flyway-migrate:
image: flyway/flyway:8.5.13
extends:
file: docker-compose.yaml
service: api-base
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
volumes:
- sql_files:/flyway/sql/migrations
command:
- -url=jdbc:mariadb://mysql:3306/${MARIADB_DATABASE}?createDatabaseIfNotExist=true
- -connectRetries=60
- -user=${MARIADB_USER}
- -password=${MARIADB_PASSWORD}
- migrate
volumes:
ui_files:
driver: local
driver_opts:
o: bind
type: none
device: ${ROOT}/patient-portal-ui
demo_sql_files:
driver: local
driver_opts:
o: bind
type: none
device: ${ROOT}/patient-portal/sql