feat: implement knowledge testing system with leaderboard, quiz generation, and PocketBase integration

This commit is contained in:
RaymondVerhoef
2026-05-14 16:53:10 +02:00
parent 42d7209773
commit 74ba5d3dc0
15 changed files with 590 additions and 512 deletions

View File

@@ -5,6 +5,17 @@ services:
expose:
- "80"
pocketbase:
image: ghcr.io/muchobien/pocketbase:latest
restart: always
expose:
- "8090"
ports:
- "8090:8090" # Remove after initial setup via admin UI
volumes:
- pb_data:/pb/pb_data
command: ["serve", "--http=0.0.0.0:8090"]
caddy:
image: caddy:2-alpine
restart: always
@@ -17,21 +28,25 @@ services:
- /bin/sh
- -c
- |
# Build Caddyfile on container start
CLEAN_DOMAIN=$(printf '%s' "$DOMAIN_NAME" | tr -d ';')
cat > /etc/caddy/Caddyfile <<EOF
$${CLEAN_DOMAIN} {
handle /pb/* {
uri strip_prefix /pb
reverse_proxy pocketbase:8090
}
reverse_proxy /* frontend:80
}
EOF
# Run Caddy with the generated file
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
volumes:
- caddy_data:/data
- caddy_config:/config
depends_on:
- frontend
- pocketbase
volumes:
caddy_data:
caddy_config:
pb_data: