Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
128 lines (120 loc) · 3.42 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
128 lines (120 loc) · 3.42 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
version: "3.8"
name: aloha_public
services:
# MongoDB service
mongodb:
image: docker.io/mongo:noble
container_name: mongodb
restart: unless-stopped
network_mode: host
command: mongod --quiet --logpath /dev/null
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
# Prometheus service
prometheus:
image: docker.io/prom/prometheus:v3.7.0
container_name: prometheus
restart: unless-stopped
network_mode: host
ports:
- "9090:9090"
volumes:
- prometheus_data:/prometheus
configs:
- source: prometheus_config
target: /etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention.time=200h"
# Keycloak service
keycloak:
image: docker.io/keycloak/keycloak:26.4
container_name: keycloak
restart: unless-stopped
network_mode: host
ports:
- "8080:8080"
- "9000:9000"
environment:
- JAVA_OPTS='-Dkc.trust.all.certificates=true'
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
- KC_HOSTNAME=localhost
volumes:
- keycloak_truststore:/conf/truststores
- keycloak_data:/opt/keycloak/data
command:
- start-dev
- "--tls-hostname-verifier=ANY"
- "--truststore-paths=/conf/truststores"
- "--health-enabled=true"
healthcheck:
test:
[
"CMD-SHELL",
"exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET /health/ready HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q '200 OK'",
]
interval: 10s
timeout: 10s
retries: 3
start_period: 10s
# Main application service
server:
build:
context: .
dockerfile: Dockerfile.public
container_name: aloha_server
restart: unless-stopped
network_mode: host
ports:
- "3000:3000"
environment:
BOOTSTRAP_ADMIN_USERNAME: admin
SECURE_COOKIES: "false"
CAS_URL: "<CAS_URL>"
AUTHENTICATION_PLUGIN: ""
CLIENT_SECRET: "replace me with a random client secret key"
SERVER_SECRET: "replace me with a random server secret key"
SERVER_PORT: "3000"
MONGODB_URI: mongodb://localhost:27017/ALOHA
OIDC_ENABLED: "true"
OIDC_CODE_REDIRECT_URI: http://localhost:3000/api/oauth2/code/login
OIDC_JWKS: "replace me with the JWKS"
OIDC_CLIENT_ID: aloha
OIDC_ISSUER_URL: http://localhost:8080/realms/oidc
OIDC_IDENTITY_PROPAGATION_SERVICE_PATH: ""
OIDC_USE_IDENTITY_PROPAGATION_SERVICE: "true"
OIDC_UNKNOWN_USERS_ALLOW: "true"
OIDC_UNKNOWN_USERS_PERMISSIONS: CLIENTS_READ,MCP_PROXY_ACCESS
# NODE_TLS_REJECT_UNAUTHORIZED: 0
depends_on:
mongodb:
condition: service_started
required: true
keycloak:
condition: service_healthy
restart: true
required: true
prometheus:
condition: service_started
required: false
volumes:
mongodb_data:
prometheus_data:
keycloak_truststore:
keycloak_data:
configs:
prometheus_config:
content: |
# See docs/metrics.md for full documentation.
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: "aloha"
metrics_path: "/metrics"
static_configs:
- targets: ["localhost:3000"]