87 lines
1.8 KiB
YAML
87 lines
1.8 KiB
YAML
name: monthly-report-kit
|
|
|
|
services:
|
|
report-renderer:
|
|
build:
|
|
context: ./source/renderer
|
|
container_name: monthly-report-renderer
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
TZ: ${TZ}
|
|
GOTENBERG_URL: http://gotenberg:3000
|
|
RENDER_TIMEOUT_SECONDS: ${RENDER_TIMEOUT_SECONDS}
|
|
MAX_PAYLOAD_BYTES: ${MAX_PAYLOAD_BYTES}
|
|
|
|
ports:
|
|
- "${REPORT_RENDERER_BIND_IP}:${REPORT_RENDERER_PORT}:8080"
|
|
|
|
depends_on:
|
|
gotenberg:
|
|
condition: service_healthy
|
|
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- python
|
|
- -c
|
|
- >-
|
|
import urllib.request;
|
|
urllib.request.urlopen(
|
|
'http://127.0.0.1:8080/health',
|
|
timeout=3
|
|
).read()
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 20s
|
|
|
|
networks:
|
|
report_internal:
|
|
n8n_backend:
|
|
aliases:
|
|
- report-renderer
|
|
|
|
gotenberg:
|
|
image: ${GOTENBERG_IMAGE}
|
|
platform: ${GOTENBERG_PLATFORM}
|
|
container_name: monthly-report-gotenberg
|
|
restart: unless-stopped
|
|
|
|
init: true
|
|
|
|
entrypoint:
|
|
- /usr/bin/gotenberg
|
|
|
|
command:
|
|
- --chromium-disable-javascript=true
|
|
- --api-timeout=90s
|
|
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- >-
|
|
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3000;
|
|
printf "HEAD /health HTTP/1.0\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n" >&3;
|
|
IFS= read -r status <&3;
|
|
case "$$status" in
|
|
*" 200 "*) exit 0 ;;
|
|
*) exit 1 ;;
|
|
esac'
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 20s
|
|
|
|
networks:
|
|
report_internal:
|
|
|
|
networks:
|
|
report_internal:
|
|
name: monthly-report-internal
|
|
internal: true
|
|
|
|
n8n_backend:
|
|
external: true
|
|
name: ${N8N_NETWORK}
|