Workflow-App/Workflow/docker-compose.yml

46 lines
2 KiB
YAML
Raw Normal View History

# ─────────────────────────────────────────────────────────────────
# 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