Files
ma_proposal_bot/compose.yaml
T
uhlwoogiandClaude Opus 5.5 5b7b73225f Run Proposal Bot as a standalone Docker container
Convert the app from the Windows/server2 share deployment to a Docker
stack deployed through Portainer behind Nginx Proxy Manager.

- Serve the Project Images library (it returned 403) from the mounted folder
- Make the InDesign export work in a container: load app images from disk,
  run Chromium without the sandbox, and wait for its full output
- Return error messages instead of stack traces; cap export request size
- Warn at startup about missing sign-in settings or an unwritable data folder
- compose.yaml: join NPM's network, take all settings from stack variables,
  require absolute host paths for data and the photo library
- Add .dockerignore, .env.example, and .gitignore
- Stop tracking data, Project Images, Backups, and InDesign Exports
- Remove the share publishing, Windows host, and browser migration scripts
- Rewrite the README for Portainer and NPM deployment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:45:35 +00:00

41 lines
1.7 KiB
YAML

# Deploy as a Portainer stack (Repository) or with `docker compose up -d --build`.
# Every setting below comes from the stack's environment variables (Portainer) or a .env file (CLI).
services:
proposal-bot:
build:
context: .
image: proposal-bot:latest
container_name: proposal-bot
restart: unless-stopped
# Reaps the headless Chromium processes the InDesign export starts.
init: true
# No published port: Nginx Proxy Manager reaches http://proposal-bot:4181 over its Docker network.
networks:
- proxy
environment:
HOST: 0.0.0.0
PORT: 4181
PROPOSAL_BOT_DATA_DIR: "/app/data"
PROPOSAL_BOT_PROJECT_IMAGES_DIR: "/app/Project Images"
PROPOSAL_BOT_AUTH_REQUIRED: "${PROPOSAL_BOT_AUTH_REQUIRED:-true}"
MICROSOFT_TENANT_ID: "${MICROSOFT_TENANT_ID:-}"
MICROSOFT_CLIENT_ID: "${MICROSOFT_CLIENT_ID:-}"
MICROSOFT_CLIENT_SECRET: "${MICROSOFT_CLIENT_SECRET:-}"
MICROSOFT_REDIRECT_URI: "${MICROSOFT_REDIRECT_URI:-}"
PROPOSAL_BOT_ALLOWED_EMAILS: "${PROPOSAL_BOT_ALLOWED_EMAILS:-}"
volumes:
# Saved projects. Must be writable by UID 1000 (the container's node user).
- type: bind
source: ${PROPOSAL_BOT_DATA_HOST_PATH:?Set PROPOSAL_BOT_DATA_HOST_PATH to an absolute host folder for saved projects}
target: /app/data
# Photo library, one subfolder per typology. Add photos here on the host.
- type: bind
source: ${PROPOSAL_BOT_PROJECT_IMAGES_HOST_PATH:?Set PROPOSAL_BOT_PROJECT_IMAGES_HOST_PATH to an absolute host folder for the photo library}
target: /app/Project Images
read_only: true
networks:
proxy:
external: true
name: ${NPM_NETWORK:?Set NPM_NETWORK to the Docker network Nginx Proxy Manager is attached to}