-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
160 lines (154 loc) · 4.44 KB
/
docker-compose.dev.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
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
version: '3.3'
services:
api:
# image: leistivo/convert-pheno-ui-server:latest
image: leistivo/convert-pheno-ui-server:${DOCKER_IMG_TAG}
container_name: convert-pheno-api
# build:
# context: ./convertPheno_server
# target: prod
# args:
# - IGNORE_CACHE_FROM_HERE=${IGNORE_CACHE_FROM_HERE}
depends_on:
api-db:
condition: service_healthy
keycloak:
condition: service_healthy
ports:
- 5000:5000
volumes:
- api-data:/opt/data
- /var/run/docker.sock:/var/run/docker.sock
environment:
API_DB_USER: ${API_DB_USER}
API_DB_PW: ${API_DB_PW}
API_DB_HOST: ${API_DB_HOST}
API_DB_PORT: ${API_DB_PORT}
API_DB_NAME: ${API_DB_NAME}
KC_REALM: ${KC_REALM}
UID: ${UID}
GID: ${GID}
API_SECURITY: true
restart: unless-stopped
healthcheck:
test: curl -f http://0.0.0.0:5000/api/curltest
interval: 10s
timeout: 10s
retries: 5
tty: true
api-db:
image: postgres:13-alpine
container_name: convert-pheno-api-db
volumes:
- postgres-data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${API_DB_NAME}
- POSTGRES_USER=${API_DB_USER}
- POSTGRES_PASSWORD=${API_DB_PW}
restart: unless-stopped
healthcheck:
test: pg_isready -U postgres
client:
image: leistivo/convert-pheno-ui-client:${DOCKER_IMG_TAG}
# container_name: convert-pheno-client
# build:
# context: ./convertPheno_client
# args:
# - IGNORE_CACHE_FROM_HERE=${IGNORE_CACHE_FROM_HERE}
depends_on:
keycloak:
condition: service_healthy
api:
condition: service_healthy
ports:
- 80:80
- 443:443
volumes:
- ./nginx_mountpoint/templates:/etc/nginx/templates:ro
- ./nginx_mountpoint/includes:/etc/nginx/includes:ro
- ./nginx_mountpoint/certs/${DOMAIN}.pem:/etc/nginx/${DOMAIN}.pem:ro
- ./nginx_mountpoint/certs/${DOMAIN}-key.pem:/etc/nginx/${DOMAIN}-key.pem:ro
- ./nginx_mountpoint/replace_env_vars.sh:/docker-entrypoint.d/replace_env_vars.sh
user: root
environment:
NODE_ENV: production
VITE_SECURITY: true
VITE_API_URL: https://${DOMAIN}/
VITE_KC_CONFIG: ${KC_CONFIG}
VITE_FILEPOND_TIMEOUT: 10000 # 10 seconds
MATOMO_TAG_MANAGER_URL: ${MATOMO_TAG_MANAGER_URL}
restart: unless-stopped
healthcheck:
test: curl -kf https://0.0.0.0:443
interval: 10s
timeout: 10s
retries: 5
keycloak-db:
image: postgres:13-alpine
container_name: kc-db
environment:
POSTGRES_DB: ${KC_DB}
POSTGRES_USER: ${KC_DB_USER}
POSTGRES_PASSWORD: ${KC_DB_PW}
restart: unless-stopped
healthcheck:
test: pg_isready -U ${KC_DB_USER}
keycloak:
container_name: keycloak
image: quay.io/keycloak/keycloak:20.0.1
depends_on:
- keycloak-db
environment:
DB_VENDOR: postgres
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: ${KC_DB_USER}
DB_PASSWORD: ${KC_DB_PW}
KEYCLOAK_ADMIN: ${KC_ADMIN_USER}
KEYCLOAK_ADMIN_PASSWORD: ${KC_ADMIN_PW}
# KC_PROXY: edge
# KC_HOSTNAME_STRICT: false
# KC_HOSTNAME_PATH: /auth
# KC_HOSTNAME_URL: http://${DOMAIN}/auth/
# KC_HOSTNAME_ADMIN_URL: http://${DOMAIN}/auth/
# KC_HTTPS_CERTIFICATE_FILE: /opt/keycloak/conf/server.crt.pem
# KC_HTTPS_CERTIFICATE_KEY_FILE: /opt/keycloak/conf/server.key.pem
KC_HEALTH_ENABLED: true
ports:
- 8080:8080
- 8443:8443
volumes:
- type: bind
source: ./realm-export.json
target: /opt/keycloak/data/import/realm-export.json
# - type: bind
# source: ./nginx_mountpoint/certs/${DOMAIN}.pem
# target: /opt/keycloak/conf/server.crt.pem
# read_only: true
# - type: bind
# source: ./nginx_mountpoint/certs/${DOMAIN}-key.pem
# target: /opt/keycloak/conf/server.key.pem
# read_only: true
restart: unless-stopped
command: start-dev --import-realm
healthcheck:
test: curl localhost:8080/health | grep -q "UP"
interval: 10s
timeout: 10s
retries: 5
convert-pheno:
user: root
image: manuelrueda/convert-pheno:latest
container_name: convert-pheno
restart: unless-stopped
tty: true
volumes:
- api-data:/home
volumes:
postgres-data:
api-data:
driver: local
driver_opts:
type: none
device: ${PWD}/data
o: bind