-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
170 lines (163 loc) · 5.38 KB
/
docker-compose.yml
File metadata and controls
170 lines (163 loc) · 5.38 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
services:
portal-backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- PYTHONPATH=/app
- DATABASE_PATH=/data/plugin_registry.db
- DATASET_DIR_TOOL=/datasets_tool
- DATASET_DIR_MEASUREMENT=/datasets_measurement
- DATASET_DIR_WORKFLOW=/datasets_workflow
- MINIO_ENDPOINT=${MINIO_ENDPOINT:-minio:9000}
- MINIO_ACCESS_KEY=${MINIO_SERVER_ACCESS_KEY:-minioadmin}
- MINIO_SECRET_KEY=${MINIO_SERVER_SECRET_KEY:-minioadmin}
- MINIO_PORT=${MINIO_PORT:-8004}
- USE_SSL=${USE_SSL:-false}
- FHIR_ENDPOINT=${FHIR_ENDPOINT:-hapi-fhir:8080/fhir}
- DIGITALTWINS_API_BASE_URL=${DIGITALTWINS_API_BASE_URL:-http://digitaltwins-api}
- DIGITALTWINS_API_PORT=${DIGITALTWINS_API_PORT:-8000}
- PORTAL_BACKEND_HOST=${PORTAL_BACKEND_HOST:-localhost}
- PORTAL_KEYCLOAK_BASE_URL=${PORTAL_KEYCLOAK_BASE_URL:-https://130.216.216.243:8009}
- KEYCLOAK_REALM=${KEYCLOAK_REALM:-digitaltwins}
- KEYCLOAK_CLIENT_ID=${KEYCLOAK_CLIENT_ID:-api}
- KEYCLOAK_CLIENT_SECRET=${KEYCLOAK_CLIENT_SECRET:-xxxxxx}
- KEYCLOAK_VERIFY_SSL=${KEYCLOAK_VERIFY_SSL:-false}
- KEYCLOAK_CA_CERT=${KEYCLOAK_CA_CERT:-}
# Nginx plugin config (shared volume with portal-frontend)
- NGINX_PLUGINS_CONF_DIR=/nginx-plugins-conf
- NGINX_CONTAINER_NAME=digitaltwins-platform-portal-frontend
volumes:
- portal_datasets:/app/data
- ./backend/datasets_tool:/datasets_tool
- ./backend/datasets_measurement:/datasets_measurement
- ./backend/datasets_workflow:/datasets_workflow
- ./backend/configs.ini:/app/configs.ini
- plugin_database:/data
- /var/run/docker.sock:/var/run/docker.sock
- nginx_plugin_configs:/nginx-plugins-conf
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
networks:
- digitaltwins
depends_on:
- minio
portal-frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_KEYCLOAK_URL=${PORTAL_KEYCLOAK_BASE_URL}
- VITE_KEYCLOAK_REALM=${KEYCLOAK_REALM:-digitaltwins}
- VITE_KEYCLOAK_CLIENT_ID=portal-frontend
container_name: digitaltwins-platform-portal-frontend
ports:
- "80:80"
- "443:443"
environment:
- BACKEND_PORT=${BACKEND_PORT:-8000}
- PORTAL_BACKEND_HOST=${PORTAL_BACKEND_HOST:-localhost}
volumes:
- nginx_plugin_configs:/etc/nginx/conf.d/plugins
- ${SSL_CERT_DIR:-./certs}:/etc/nginx/certs:ro
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:80" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
networks:
- digitaltwins
depends_on:
- portal-backend
minio:
image: quay.io/minio/minio:latest
ports:
- '8004:9000' #backend
- '8007:9001' #frontend
networks:
- digitaltwins
volumes:
- 'minio_data:/data'
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- MINIO_SERVER_ACCESS_KEY=${MINIO_SERVER_ACCESS_KEY:-minioadmin}
- MINIO_SERVER_SECRET_KEY=${MINIO_SERVER_SECRET_KEY:-minioadmin}
command: server /data --console-address ":9001" --address ":9000"
hapi-fhir:
image: hapiproject/hapi:latest
restart: on-failure
ports:
- "8006:8080"
networks:
- digitaltwins
volumes:
- ./hapi/application.yaml:/app/config/application.yaml
environment:
- SPRING_CONFIG_LOCATION=/app/config/application.yaml
depends_on:
- hapi-fhir-postgres
hapi-fhir-postgres:
image: postgres:13-alpine
restart: always
networks:
- digitaltwins
environment:
POSTGRES_DB: "hapi"
POSTGRES_USER: "admin"
POSTGRES_PASSWORD: "admin"
volumes:
- hapi_fhir_postgres:/var/lib/postgresql/data
minio-init:
image: quay.io/minio/mc:latest
depends_on:
- minio
networks:
- digitaltwins
restart: "no"
entrypoint: >
/bin/sh -c "
echo 'Waiting for MinIO...';
until mc alias set myminio http://minio:9000 minioadmin minioadmin; do
sleep 2;
done;
echo 'MinIO is up!';
for BUCKET in measurements models workflows processes; do
echo \"Creating private bucket '$$BUCKET'...\";
mc mb myminio/$$BUCKET --ignore-existing;
done;
echo 'Creating public bucket tools...';
mc mb myminio/tools --ignore-existing;
echo '{\"Version\": \"2012-10-17\", \"Statement\": [{\"Effect\": \"Allow\", \"Principal\": \"*\", \"Action\": [\"s3:GetObject\", \"s3:GetObjectVersion\", \"s3:PutObject\"], \"Resource\": \"arn:aws:s3:::tools/*\"}]}' > /tmp/tools-policy.json;
mc anonymous set-json /tmp/tools-policy.json myminio/tools;
echo 'Buckets created and policies applied successfully.';
"
networks:
digitaltwins:
driver: bridge
name: digitaltwins
volumes:
portal_datasets:
name: digitaltwins_portal_datasets
driver: local
hapi_fhir_postgres:
name: digitaltwins_hapi_fhir_postgres
driver: local
plugin_database:
name: digitaltwins_plugin_database
driver: local
minio_data:
name: digitaltwins_minio_data
driver: local
nginx_plugin_configs:
name: digitaltwins_nginx_plugin_configs
driver: local