rybbit/docs/docker-compose.yml
Bill Yang aaeba003f5 Update Caddyfile and docker-compose.yml for local development configuration
- Added global options in Caddyfile to disable automatic HTTPS and use local certificates.
- Updated docker-compose.yml to fallback to localhost for DOMAIN_NAME if not set, and removed unnecessary port mappings for HTTP/3.
2025-04-21 01:29:51 -07:00

27 lines
No EOL
836 B
YAML

services:
caddy:
image: caddy:latest
container_name: docs_caddy
restart: unless-stopped
ports:
- "8080:80" # Using different port to avoid conflict with main app
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile # Mount Caddy config file
- docs_caddy_data:/data # Mount persistent data volume for certs etc.
- docs_caddy_config:/config # Mount persistent config volume
environment:
# Fallback to localhost if domain not set
- DOMAIN_NAME=${DOMAIN_NAME:-localhost}
depends_on:
- docs
docs:
container_name: docs_app
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
volumes:
docs_caddy_data: # Persistent volume for Caddy's certificates and state
docs_caddy_config: # Persistent volume for Caddy's configuration cache