BE-LightningReport/report_service/docker-compose.yml

46 lines
1.7 KiB
YAML

# Example compose snippet. If n8n is already defined in another compose file,
# drop the `report-service` block below into that file (under `services`) and
# attach it to the same network n8n uses.
#
# Build context is the repository root, not the report_service folder.
#
# cd lightning_report/
# docker compose -f report_service/docker-compose.yml up --build -d
#
# Then in the n8n HTTP Request node, point at:
# http://report-service:8000/generate (same Docker network)
# or http://<host-ip>:8000/generate (host networking)
services:
report-service:
build:
context: ..
dockerfile: report_service/Dockerfile
image: lightning-report-service:latest
container_name: lightning-report-service
restart: unless-stopped
environment:
- LOG_LEVEL=INFO
# Shared secret the n8n HTTP Request node must send as `X-Report-Token`.
# The service refuses all /generate calls if this is unset.
- REPORT_SERVICE_TOKEN=${REPORT_SERVICE_TOKEN:-}
# Only needed if n8n does NOT pre-compute gemini_text and you want the
# service to call Gemini itself.
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- GEMINI_MODEL=${GEMINI_MODEL:-gemini-1.5-flash}
# Mapbox token for the satellite basemap behind the coordinate-plane charts.
# Charts fall back to a plain background when unset.
- MAPBOX_TOKEN=${MAPBOX_TOKEN:-}
ports:
- "8000:8000"
networks:
- n8n
networks:
n8n:
external: true
# If your n8n docker network has a different name, change it here
# (check with: `docker network ls`). You can also remove `external: true`
# to have compose create a fresh bridge network.
name: n8n