Coolify's Traefik defaults to the 'coolify' network, but the frontend was only on the per-resource network -> Traefik couldn't reach it (000/empty reply). Join the external coolify network + set traefik.docker.network=coolify. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
# Visigine — deployment compose at the REPO ROOT so build contexts resolve
|
|
# correctly under Coolify (which runs compose with --project-directory = repo root).
|
|
# Frontend (nginx) is the only ingress; the backend is reachable only over the
|
|
# internal docker network. Dockerfiles live in docker/ and assume context = root.
|
|
#
|
|
# Secrets (MISTRAL_KEY, ADMIN_TOKEN, …) are injected from Coolify env vars.
|
|
|
|
name: visigine
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/backend.Dockerfile
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: "3001"
|
|
ALLOWED_ORIGINS: "https://visigine.de"
|
|
ALLOW_PRIVATE_HOSTS: "0"
|
|
DB_PATH: "/data/visigine.db"
|
|
MISTRAL_KEY: ${MISTRAL_KEY}
|
|
ADMIN_TOKEN: ${ADMIN_TOKEN}
|
|
OPENAI_KEY: ${OPENAI_KEY:-}
|
|
PERPLEXITY_KEY: ${PERPLEXITY_KEY:-}
|
|
ANTHROPIC_KEY: ${ANTHROPIC_KEY:-}
|
|
expose:
|
|
- "3001"
|
|
volumes:
|
|
# Persist the SQLite file across container rebuilds.
|
|
- visigine_data:/data
|
|
restart: unless-stopped
|
|
networks:
|
|
- default
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/frontend.Dockerfile
|
|
# No host port binding: Coolify/Traefik routes visigine.de to this port 80.
|
|
expose:
|
|
- "80"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
# Join Coolify's proxy network so Traefik (which defaults to the `coolify`
|
|
# network) can reach this container, and point Traefik at that network
|
|
# explicitly since the container is attached to several.
|
|
networks:
|
|
- default
|
|
- coolify
|
|
labels:
|
|
- "traefik.docker.network=coolify"
|
|
|
|
networks:
|
|
coolify:
|
|
external: true
|
|
|
|
volumes:
|
|
visigine_data:
|