Files
nextcloud/compose.eurooffice.yml
Linus Gasser e887446bac fix: drop eurooffice_db_password secret, use Postgres trust auth (15.1.2)
Requiring a second Swarm secret in 15.1.1 broke `abra app upgrade` for stacks
that had Euro-Office enabled on 15.1.0 ("missing version for secret?
(eurooffice_db_password)"). The document server's Postgres is internal-only and
holds only transient state, so switch it to POSTGRES_HOST_AUTH_METHOD=trust and
remove the managed secret. Entrypoint wrapper drops file_env DB_PWD (v3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 18:35:00 +02:00

109 lines
3.2 KiB
YAML

version: "3.8"
services:
app:
secrets:
- eurooffice_jwt
environment:
- EUROOFFICE_DOMAIN
eurooffice:
image: ghcr.io/euro-office/documentserver:latest
stdin_open: true
depends_on:
- eurooffice-db
- eurooffice-rabbitmq
networks:
- proxy
- internal
environment:
- JWT_ENABLED=true
- JWT_SECRET_FILE=/run/secrets/eurooffice_jwt
# Use external Postgres + RabbitMQ instead of the flaky bundled ones.
# (The all-in-one image ships an uncleanly-shut-down Postgres data dir
# whose crash recovery exceeds pg_ctl's start timeout -> restart loop.)
- DB_TYPE=postgres
- DB_HOST=eurooffice-db
- DB_PORT=5432
- DB_NAME=eurooffice
- DB_USER=eurooffice
- AMQP_URI=amqp://guest:guest@eurooffice-rabbitmq
volumes:
- eurooffice_data:/var/lib/euro-office
- eurooffice_config:/etc/euro-office
- eurooffice_logs:/var/log/euro-office
- eurooffice_fonts:/usr/share/fonts/custom
secrets:
- eurooffice_jwt
configs:
- source: entrypoint_eurooffice
target: /custom-entrypoint.sh
mode: 555
entrypoint: /custom-entrypoint.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/healthcheck"]
interval: 30s
timeout: 10s
retries: 10
start_period: 3m
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.swarm.network=proxy"
- "traefik.http.services.${STACK_NAME}_eurooffice.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}_eurooffice.rule=Host(`${EUROOFFICE_DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}_eurooffice.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}_eurooffice.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}_eurooffice.middlewares=${STACK_NAME}_eurooffice-fwdproto"
- "traefik.http.middlewares.${STACK_NAME}_eurooffice-fwdproto.headers.customRequestHeaders.X-Forwarded-Proto=https"
eurooffice-db:
image: postgres:16-alpine
networks:
- internal
environment:
- POSTGRES_DB=eurooffice
- POSTGRES_USER=eurooffice
# Internal-only DB holding transient editing state; trust auth on the
# private overlay network avoids managing a Swarm secret for it.
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- eurooffice_db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "eurooffice"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
eurooffice-rabbitmq:
image: rabbitmq:4.3.2
networks:
- internal
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
secrets:
eurooffice_jwt:
external: true
name: ${STACK_NAME}_eurooffice_jwt_${SECRET_EUROOFFICE_JWT_VERSION}
volumes:
eurooffice_data:
eurooffice_config:
eurooffice_logs:
eurooffice_fonts:
eurooffice_db:
configs:
entrypoint_eurooffice:
name: ${STACK_NAME}_entrypoint_eurooffice_${ENTRYPOINT_EUROOFFICE_VERSION}
file: entrypoint.eurooffice.sh.tmpl
template_driver: golang