Skip to content

Commit 7c7222c

Browse files
committed
initial config
1 parent ea40024 commit 7c7222c

3 files changed

Lines changed: 93 additions & 11 deletions

File tree

compose/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
data/
2+
nginx/log/
3+
nginx/ssl/*.key
4+
nginx/ssl/*.pem
5+
nginx/ssl/*.crt
6+
.env

compose/compose.keycloak.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# 👇 Rename `.env-template` to `.env` before running this file
2+
# Set the appropriate values once renamed
3+
services:
4+
# Relational database for Keycloak (optional)
5+
mysql-shared:
6+
image: mysql:8.0
7+
container_name: mysql-shared
8+
restart: unless-stopped
9+
env_file:
10+
- .env
11+
environment:
12+
MYSQL_ROOT_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
13+
MYSQL_DATABASE: keycloak
14+
MYSQL_USER: keycloak
15+
MYSQL_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
16+
volumes:
17+
- mysql_data:/var/lib/mysql
18+
networks:
19+
- codetogethernet
20+
healthcheck:
21+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
22+
interval: 10s
23+
timeout: 10s
24+
retries: 30
25+
26+
# Keycloak service (optional)
27+
codetogether-keycloak:
28+
image: quay.io/keycloak/keycloak:latest
29+
container_name: codetogether-keycloak
30+
env_file:
31+
- .env
32+
depends_on:
33+
mysql-shared:
34+
condition: service_healthy
35+
command:
36+
- "start"
37+
environment:
38+
# Admin credentials
39+
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
40+
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
41+
42+
# Database connectivity
43+
KC_DB: mysql
44+
KC_DB_USERNAME: ${KEYCLOAK_DB_USERNAME:-root}
45+
KC_DB_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
46+
KC_DB_URL_HOST: mysql-shared
47+
48+
# Feature flags & observability
49+
KC_FEATURES: token-exchange
50+
KC_HEALTH_ENABLED: "true"
51+
KC_METRICS_ENABLED: "true"
52+
53+
# Reverse‑proxy / HTTP
54+
KC_HTTP_ENABLED: "true"
55+
KC_PROXY_HEADERS: xforwarded
56+
KC_HOSTNAME_STRICT: "false"
57+
KC_HOSTNAME_STRICT_HTTPS: "false"
58+
ports:
59+
- "5999:8080"
60+
networks:
61+
- codetogethernet
62+
healthcheck:
63+
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
64+
interval: 10s
65+
timeout: 10s
66+
retries: 20
67+
68+
volumes:
69+
mysql_data:

compose/cthq.properties

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@ hq.collab.secret=${INTEL_SECRET}
66
# Fill in values specific to your deployment
77

88
# If you want to run with multiple SSO providers, add their names separated with commas
9-
hq.sso.tenants=github
9+
# hq.sso.tenants=github
1010

1111
# GitHub SSO
12-
hq.sso.github.provider=github
13-
hq.sso.github.label=GitHub
14-
hq.sso.github.client.id=<github_client_id>
15-
hq.sso.github.client.secret=<github_client_secret>
16-
hq.sso.github.redirect.uri=https://${INTEL_FQDN}/api/v1/auth/sso/success/insights
17-
hq.sso.github.auth.uri=https://github.com/login/oauth/authorize
18-
hq.sso.github.token.uri=https://github.com/login/oauth/access_token
19-
hq.sso.github.info.uri=https://api.github.com/user
20-
hq.sso.github.jwt.set.uri=https://token.actions.githubusercontent.com/.well-known/jwks
21-
hq.sso.github.logout.uri=https://github.com/logout
12+
# hq.sso.github.provider=github
13+
# hq.sso.github.label=GitHub
14+
# hq.sso.github.client.id=Iv1.45b9336a78ce2476
15+
# hq.sso.github.client.secret=c4446ad126ec65b3d926e37de3fe880246aff371
16+
# hq.sso.github.redirect.uri=https://${INTEL_FQDN}/api/v1/auth/sso/success/insights
17+
# hq.sso.github.auth.uri=https://github.com/login/oauth/authorize
18+
# hq.sso.github.token.uri=https://github.com/login/oauth/access_token
19+
# hq.sso.github.info.uri=https://api.github.com/user
20+
# hq.sso.github.jwt.set.uri=https://token.actions.githubusercontent.com/.well-known/jwks
21+
# hq.sso.github.logout.uri=https://github.com/logout
22+
23+
hq.sso.provider=keycloak
24+
hq.sso.client.id=codetogether
25+
hq.sso.client.secret=eFl6XSKwMMsEW1yRTY9pHjBrCTHDEY64
26+
hq.sso.client.issuer.url=http://codetogether-keycloak:8080/realms/codetogether
27+
hq.sso.redirect.uri=https://${INTEL_FQDN}/api/v1/auth/sso/success/insights
28+
hq.sso.client.authentication.method=client_secret_post
2229

2330
# These values do not need to be changed, though secrets can be updated
2431
hq.db.type=CASSANDRA

0 commit comments

Comments
 (0)