services: postgres: restart: unless-stopped image: postgres:16-alpine environment: POSTGRES_DB: thallium POSTGRES_PASSWORD: thallium POSTGRES_USER: thallium healthcheck: test: ["CMD-SHELL", "pg_isready -U thallium"] interval: 2s timeout: 1s retries: 5 ports: - "15432:5432" thallium-backend: build: context: thallium-backend cache_from: - type=registry,ref=ghcr.io/owl-corp/thallium-backend:latest restart: unless-stopped command: ["alembic upgrade head && uvicorn src.app:fastapi_app --host 0.0.0.0 --port 8000 --reload --no-server-header"] volumes: - ./thallium-backend/migrations:/thallium/migrations:ro - ./thallium-backend/src:/thallium/src:ro env_file: - .env environment: BACKEND_DATABASE_URL: postgresql+psycopg_async://thallium:thallium@postgres:5432/thallium BACKEND_TOKEN: suitable-for-development-only BACKEND_APP_PREFIX: /api BACKEND_SIGNING_KEY: super-secure-key ports: - "8000:8000" depends_on: postgres: condition: service_healthy thallium-frontend: build: context: thallium-frontend dockerfile: Dockerfile.development cache_from: - type=registry,ref=ghcr.io/owl-corp/thallium-frontend:latest restart: unless-stopped volumes: # Once https://github.com/vitejs/vite/issues/9470 has a nice solution, we can make the mount read-only - ./thallium-frontend:/app - /app/node_modules ports: - "5173:5173" thallium-caddy: image: caddy:2-alpine restart: unless-stopped volumes: - ./thallium-caddy/Caddyfile:/etc/caddy/Caddyfile:ro - ./thallium-caddy/data:/data ports: - "80:80" depends_on: - thallium-backend - thallium-frontend