Skip to content

Commit 833b022

Browse files
committed
Cleanup Blaze Config
1 parent 640da04 commit 833b022

File tree

10 files changed

+184
-186
lines changed

10 files changed

+184
-186
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ jobs:
5656
sed -i -r -e 's#^(VALIDATION_ENABLED)=.*$#\1="false"#' \
5757
data-node/fhir-validator/.env
5858
sed -i -r -e 's#^(OPENID_PROVIDER_URL)=.*$#\1="https://auth.localhost:444/realms/blaze"#' \
59-
-e 's#^(KC_HOSTNAME)=.*$#\1="https://auth.localhost:444/"#' \
59+
data-node/fhir-server/.backend-env
60+
sed -i -r -e 's#^(KC_HOSTNAME)=.*$#\1="https://auth.localhost:444/"#' \
6061
-e 's#^(KC_HTTP_RELATIVE_PATH)=.*$#\1=/#' \
61-
data-node/fhir-server/.env
62+
data-node/fhir-server/.keycloak-env
6263
sed -i -r -e 's#^(FHIR_SERVER_HOSTNAME)=.*$#\1="fhir.localhost"#' \
6364
-e 's#^(FLARE_HOSTNAME)=.*$#\1="flare.localhost"#' \
6465
-e 's#^(KEYCLOAK_HOSTNAME)=.*$#\1="auth.localhost"#' \
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# --- Backend Configuration ---
2+
3+
# --- Base Configuration ---
4+
# Base URL for the FHIR server
5+
# Default: http://fhir-server:8080
6+
BASE_URL="http://fhir-server:8080"
7+
8+
# Logging level (trace, debug, info, warn, error)
9+
# Default: info
10+
LOG_LEVEL="debug"
11+
12+
# --- JVM Performance Tuning ---
13+
# Java tool options for memory allocation
14+
# Default: system dependent
15+
JAVA_TOOL_OPTIONS="-Xmx4g"
16+
17+
# --- Database Configuration ---
18+
# Database block cache size in MB
19+
# Default: 128
20+
DB_BLOCK_CACHE_SIZE="1024"
21+
22+
# Database resource cache ratio (number of resources)
23+
# Default: 0.25
24+
# DB_RESOURCE_CACHE_SIZE_RATIO="0.25"
25+
26+
# CQL expression cache size
27+
# Default: disabled
28+
CQL_EXPR_CACHE_SIZE="128"
29+
30+
# --- Server Configuration ---
31+
# Local port binding for FHIR server
32+
# Default: 127.0.0.1:8081
33+
PORT_FHIR_SERVER_LOCALHOST="127.0.0.1:8081"
34+
35+
# Enforce referential integrity in FHIR resources
36+
# Default: true
37+
# ENFORCE_REFERENTIAL_INTEGRITY="true"
38+
39+
# External terminology service URL
40+
# Default: disabled
41+
EXTERN_TERMINOLOGY_SERVICE_URL="http://terminology-server:8080/fhir"
42+
43+
# Enable admin API endpoints
44+
# Default: false
45+
ENABLE_ADMIN_API="true"
46+
47+
# --- FHIR Server Authentication Configuration ---
48+
# OpenID Connect provider URL
49+
# Default: disabled
50+
OPENID_PROVIDER_URL="https://auth.localhost:444/realms/blaze"
51+
52+
# Local OpenID client trust store path
53+
# Default: ../auth/trust-store.p12
54+
# LOCAL_OPENID_CLIENT_TRUST_STORE="../auth/trust-store.p12"
55+
56+
# Trust store password
57+
OPENID_CLIENT_TRUST_STORE_PASS="insecure"

data-node/fhir-server/.env.default

Lines changed: 0 additions & 173 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# --- Frontend Configuration ---
2+
3+
# The base URL of the frontend as accessed by the browser.
4+
ORIGIN="https://fhir.localhost:444"
5+
6+
# Backend base URL for internal communication
7+
BACKEND_BASE_URL="http://fhir-server:8080"
8+
9+
# The client ID of the OAuth client used to communicate with the auth
10+
# provider.
11+
AUTH_CLIENT_ID="account"
12+
13+
# The client secret of the OAuth client used to communicate with the
14+
# auth provider.
15+
AUTH_CLIENT_SECRET="insecure"
16+
17+
# Authentication issuer URL
18+
AUTH_ISSUER="https://auth.localhost:444/realms/blaze"
19+
20+
# A secret random string that is used to encrypt the session cookie.
21+
#
22+
# This should be a minimum of 32 characters, random string. On UNIX
23+
# systems you can use `openssl rand -hex 32` to generate one.
24+
AUTH_SECRET="6a0ca3f8e38a939c7c44caf61eb7e9c0055fde920b58929439789bc70c7073f6"
25+
26+
# HTTP header for protocol forwarding
27+
PROTOCOL_HEADER="X-Forwarded-Proto"
28+
29+
# HTTP header for host forwarding
30+
HOST_HEADER="X-Forwarded-Host"
31+
32+
# Path to CA certificate
33+
# Default: ../auth/cert.pem
34+
# CA_CERT="../auth/cert.pem"
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# --- Keycloak Configuration ---
2+
3+
# Enable Keycloak authentication
4+
# Default: true
5+
KEYCLOAK_ENABLED="true"
6+
7+
# --- Keycloak Configuration ---
8+
# Keycloak database name
9+
# Default: keycloakdb
10+
KC_DB_URL_DB="keycloakdb"
11+
12+
# Keycloak database username
13+
# Default: keycloakdbuser
14+
KC_DB_USERNAME="keycloakdbuser"
15+
16+
# Keycloak database password
17+
# Default: keycloakdbpw
18+
KC_DB_PASSWORD="keycloakdbpw"
19+
20+
# Keycloak bootstrap admin username
21+
# Default: admin
22+
KC_BOOTSTRAP_ADMIN_USERNAME="admin"
23+
24+
# Keycloak bootstrap admin password
25+
# Default: admin
26+
KC_BOOTSTRAP_ADMIN_PASSWORD="admin"
27+
28+
# Keycloak HTTP relative path
29+
# Default: /
30+
KC_HTTP_RELATIVE_PATH="/"
31+
32+
# Keycloak hostname (public URL)
33+
# Default: https://auth.localhost:444
34+
KC_HOSTNAME="https://auth.localhost:444"
35+
36+
# Keycloak admin console hostname
37+
# Default: https://auth.localhost:444
38+
KC_HOSTNAME_ADMIN="https://auth.localhost:444"
39+
40+
# Keycloak logging level
41+
# Default: info
42+
KC_LOG_LEVEL="info"
43+
44+
# Enable Keycloak health endpoints
45+
# Default: true
46+
KC_HEALTH_ENABLED="true"
47+
48+
# Enable Keycloak metrics endpoints
49+
# Default: true
50+
KC_METRICS_ENABLED="true"
51+
52+
# Keycloak proxy headers mode
53+
# Default: xforwarded
54+
KC_PROXY_HEADERS="xforwarded"
55+
56+
# Enable Keycloak HTTP (non-HTTPS) mode
57+
# Default: true
58+
KC_HTTP_ENABLED="true"
59+
60+
# Keycloak client ID
61+
# Default: account
62+
KEYCLOAK_CLIENT_ID="account"
63+
64+
# Keycloak client secret
65+
# Default: insecure
66+
KEYCLOAK_CLIENT_SECRET="insecure"
67+
68+
# Keycloak client host URL
69+
# Default: https://fhir.localhost:444
70+
KEYCLOAK_CLIENT_HOST_URL="https://fhir.localhost:444"

data-node/fhir-server/docker-compose.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
services:
22
fhir-server:
3-
image: samply/blaze:1.6.0
3+
image: "samply/blaze:1.6.0@sha256:76b8d0947a8463921e4cd5db291b14d58c221d4ca474a582eea3f16294ef8b3d"
44
healthcheck:
5-
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/health"]
5+
test: [ "CMD", "wget", "--spider", "http://localhost:8080/health" ]
66
interval: 5s
77
timeout: 5s
88
retries: 3
99
start_period: 60s
10+
environment:
11+
DB_SEARCH_PARAM_BUNDLE: "/app/custom-search-parameters.json"
12+
OPENID_CLIENT_TRUST_STORE: "/app/trust-store.p12"
1013
env_file:
11-
- .env
14+
- .backend-env
1215
ports:
1316
- ${PORT_FHIR_SERVER_LOCALHOST:-127.0.0.1:8081}:8080
1417
extra_hosts:
@@ -17,17 +20,19 @@ services:
1720
volumes:
1821
- "./custom-search-parameters.json:/app/custom-search-parameters.json:ro"
1922
- "blaze-data:/app/data"
20-
- "${LOCAL_OPENID_CLIENT_TRUST_STORE:-../auth/trust-store.p12}:/app/trust-store.p12"
23+
- "${LOCAL_OPENID_CLIENT_TRUST_STORE:-../auth/trust-store.p12}:/app/trust-store.p12:ro"
2124

2225
fhir-server-frontend:
23-
image: samply/blaze-frontend:1.6.0
26+
image: "samply/blaze-frontend:1.6.0@sha256:c9a455b168c1f15c087f859939e721f0ae81b47aa897bd3796a85be6bf3c5012"
2427
healthcheck:
2528
test: ["CMD-SHELL", "wget --spider http://127.0.0.1:3000/fhir/"]
2629
interval: 5s
2730
timeout: 5s
2831
retries: 3
32+
environment:
33+
NODE_EXTRA_CA_CERTS: "/app/cert.pem"
2934
env_file:
30-
- .env
35+
- .frontend-env
3136
ports:
3237
- ${PORT_FHIR_SERVER_FRONTEND_LOCALHOST:-127.0.0.1:8300}:3000
3338
extra_hosts:

0 commit comments

Comments
 (0)