From d814eaa503f9061d7382ef0747ed4cc904e041ea Mon Sep 17 00:00:00 2001 From: ZdenekSrotyr Date: Thu, 9 Apr 2026 16:39:23 +0200 Subject: [PATCH] feat: add Caddy HTTPS reverse proxy and production compose override --- Caddyfile | 3 +++ docker-compose.prod.yml | 17 +++++++++++++++++ docker-compose.yml | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 Caddyfile create mode 100644 docker-compose.prod.yml diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..ca4a5a7 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,3 @@ +{$DOMAIN:localhost} { + reverse_proxy app:8000 +} diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 0000000..236c8ab --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,17 @@ +# Production override — uses pre-built GHCR image instead of local build. +# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d +services: + app: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest + scheduler: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest + extract: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest + telegram-bot: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest + ws-gateway: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest + corporate-memory: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest + session-collector: + image: ghcr.io/keboola/agnes-the-ai-analyst:latest diff --git a/docker-compose.yml b/docker-compose.yml index b81f15a..406641d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -104,5 +104,25 @@ services: - full restart: unless-stopped + caddy: + image: caddy:2-alpine + ports: + - "80:80" + - "443:443" + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro + - caddy_data:/data + - caddy_config:/config + environment: + - DOMAIN=${DOMAIN:-localhost} + depends_on: + app: + condition: service_healthy + restart: unless-stopped + profiles: + - production + volumes: data: + caddy_data: + caddy_config: