# Portainer stack. Portainer pulls the image that CI (.gitea/workflows/ci.yml) pushes after the # tests pass on main; `docker compose up -d --build` builds it locally instead. Set the variables # below in Portainer's stack environment, or in a .env file next to this one. See docs/runbook.md. services: sync: build: context: . args: # Local builds only (CI uses its ORIGIN variable): set when serving plain HTTP, to the # exact address users open, e.g. http://sync-server:3000 ORIGIN: ${ORIGIN:-} # Set IMAGE to a commit tag (e.g. ...:1a2b3c4) to roll back image: ${IMAGE:-primegit.primecontrols-dev.com/c.west/sharepoint-acc-sync:latest} # Every deploy fetches the newest image, so a redeploy never reuses a stale one pull_policy: always restart: unless-stopped ports: - '${HOST_PORT:-3000}:3000' environment: SYNC_BACKEND: ${SYNC_BACKEND:-live} ADMIN_USERNAME: ${ADMIN_USERNAME:?Set ADMIN_USERNAME} ADMIN_PASSWORD: ${ADMIN_PASSWORD:?Set ADMIN_PASSWORD} SESSION_SECRET: ${SESSION_SECRET:?Set SESSION_SECRET to a long random string} POLL_INTERVAL_SECONDS: ${POLL_INTERVAL_SECONDS:-180} MANUAL_RUN_COOLDOWN_SECONDS: ${MANUAL_RUN_COOLDOWN_SECONDS:-30} MAX_ATTEMPTS: ${MAX_ATTEMPTS:-3} HISTORY_RETENTION_DAYS: ${HISTORY_RETENTION_DAYS:-7} # Times on the status pages are shown in this zone TZ: ${TZ:-America/Chicago} volumes: - sync-data:/data # Lets a sync in progress finish when the container is stopped or updated stop_grace_period: 2m volumes: sync-data: