askneo / docker-compose.yml
Faithology
Claude Opus 4.8
Deploy backend + RAG to Hugging Face Space (backend-only tree)
c6dfde3
Raw History Blame Contribute Delete
1.07 kB
# Runs on the Oracle Always Free VM.
#
# app — backend (:8000) + RAG (localhost:8787), data on a persistent volume
# caddy — reverse proxy that terminates HTTPS with automatic Let's Encrypt
#
# The frontend (Vercel, HTTPS) can only talk to an HTTPS backend, so all public
# traffic goes through Caddy on 443. The app container is never exposed directly.
services:
app:
build: .
restart: unless-stopped
env_file:
- .env.production
volumes:
- askneo-data:/data # SQLite lives here (DB_PATH=/data/database.db)
expose:
- "8000" # visible to caddy only, not the public internet
caddy:
image: caddy:2
restart: unless-stopped
depends_on:
- app
ports:
- "80:80" # needed for the HTTP-01 ACME challenge + redirect
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data # persists issued certificates across restarts
- caddy-config:/config
volumes:
askneo-data:
caddy-data:
caddy-config: