# Hankan's server, joining the Postgres and Caddy already running on the Pi. # # It brings up no database of its own: `hankan-net` is declared external, so # this file attaches to the network those services are already on rather # than standing up a parallel stack. Set the network name to whatever your # existing compose project created — `docker network ls` will show it. # # cp .env.example .env # then fill it in # docker compose up -d services: hankan: build: context: .. dockerfile: server/Dockerfile container_name: hankan restart: unless-stopped environment: # Reaches the existing Postgres by service name on the shared network. DATABASE_URL: ${DATABASE_URL} HANKAN_TOKEN: ${HANKAN_TOKEN} ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} HANKAN_TUTOR_BACKEND: ${HANKAN_TUTOR_BACKEND:-anthropic} PORT: 8787 networks: - hankan-net # No ports published: Caddy is on the same network and proxies to # hankan:8787 by name, so the service is never exposed directly. networks: hankan-net: external: true name: ${HANKAN_NETWORK:-caddy_default}