Workflow-App/Workflow/docker-compose.yml
sjcoetzeesj-coder 9ccd36ec93 build: make Dockerfile Coolify-ready
- add .dockerignore: without it the build context shipped .env.local
  (PB_TOKEN + CIPC passwords), node_modules and the full .git history
- bake NEXT_PUBLIC_PB_URL / NEXT_PUBLIC_BASE_URL / NEXT_PUBLIC_APP_URL
  as build args; NEXT_PUBLIC_PB_URL was read by client components but
  never supplied, so browser-side PocketBase calls would break
- docker-compose: same build args + Telegram runtime env
- document that agent-browser / PDFD sidecar routes stay on the PC
2026-10-18 15:30:20 +02:00

45 lines
2 KiB
YAML

# ─────────────────────────────────────────────────────────────────
# Workflow PocketBase Frontend — Docker Compose
#
# For local Docker testing (matches Coolify's contract closely enough
# that you can copy these env values straight into Coolify's UI).
#
# Usage:
# cp .env.example .env # fill in real values
# docker compose up -d --build
# open http://localhost:3000
# ─────────────────────────────────────────────────────────────────
services:
workflow:
build:
context: .
dockerfile: Dockerfile
args:
# Baked into the CLIENT bundle by Next.js at build time — all three
# must be set or browser-side PocketBase calls get an empty URL.
NEXT_PUBLIC_PB_URL: ${NEXT_PUBLIC_PB_URL:-https://pb.agent.apphub.co.za}
NEXT_PUBLIC_BASE_URL: ${NEXT_PUBLIC_BASE_URL:-http://localhost:3000}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
image: workflow-frontend:latest
container_name: workflow-frontend
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
environment:
# Server-only secrets. Coolify's secret manager is the right
# home for these — never commit real values.
PB_URL: ${PB_URL:?Set PB_URL in .env}
PB_TOKEN: ${PB_TOKEN:?Set PB_TOKEN in .env}
ONBOARDING_TOKEN_PEPPER: ${ONBOARDING_TOKEN_PEPPER:-}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-}
NODE_ENV: production
PORT: 3000
HOSTNAME: 0.0.0.0
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/api/pb/records/list?collection=ysterbaard_directors&perPage=1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s