Containerize frontend
This commit is contained in:
parent
92b3a5bc85
commit
cb565b5ac8
4 changed files with 74 additions and 36 deletions
|
|
@ -1,28 +1,22 @@
|
|||
# Caddy Reverse Proxy for Kaboot Production
|
||||
#
|
||||
# This compose file adds Caddy as a reverse proxy with automatic HTTPS.
|
||||
# Use with docker-compose.prod.yml using the -f flag.
|
||||
#
|
||||
# Usage:
|
||||
# docker compose -f docker-compose.prod.yml -f docker-compose.caddy.yml up -d
|
||||
#
|
||||
# Prerequisites:
|
||||
# 1. Copy Caddyfile.example to Caddyfile and update domains
|
||||
# 2. Build the frontend: npm run build
|
||||
# 3. Update your domain DNS to point to your server
|
||||
# 4. See docs/PRODUCTION.md for full instructions
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
container_name: kaboot-caddy
|
||||
kaboot-frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_API_URL: https://${KABOOT_DOMAIN}
|
||||
VITE_BACKEND_URL: https://${KABOOT_DOMAIN}
|
||||
VITE_AUTHENTIK_URL: https://${AUTH_DOMAIN}
|
||||
VITE_OIDC_CLIENT_ID: kaboot-spa
|
||||
VITE_OIDC_APP_SLUG: kaboot
|
||||
GEMINI_API_KEY: ${GEMINI_API_KEY:-}
|
||||
container_name: kaboot-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- ./dist:/srv/frontend:ro
|
||||
- ./caddy/data:/data
|
||||
- ./caddy/config:/config
|
||||
depends_on:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue