Files
2026-08-20 20:56:10 +02:00

138 lines
4.0 KiB
YAML

---
version: "3.8"
services:
app:
image: ghcr.io/euro-office/documentserver:v9.3.3
depends_on:
- db
- rabbitmq
networks:
- proxy
- internal
cap_drop:
- NET_RAW
environment:
- JWT_ENABLED=true
- JWT_SECRET_FILE=/run/secrets/jwt
- DB_TYPE=postgres
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=eurooffice
- DB_USER=eurooffice
- DB_PWD_FILE=/run/secrets/db_password
- AMQP_URI=amqp://guest:guest@rabbitmq
volumes:
- data:/var/www/euro-office/Data
- config:/etc/euro-office
- fonts:/usr/share/fonts/custom
secrets:
- jwt
- db_password
configs:
- source: entrypoint
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
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.swarm.network=proxy"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-fwdproto"
- "traefik.http.middlewares.${STACK_NAME}-fwdproto.headers.customRequestHeaders.X-Forwarded-Proto=https"
## Block the built-in static welcome page at / and /welcome.
## Tthere's no clean way to disable it in the image.
- "traefik.http.routers.${STACK_NAME}-noindex.rule=Host(`${DOMAIN}`) && (Path(`/`) || PathPrefix(`/welcome`))"
- "traefik.http.routers.${STACK_NAME}-noindex.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}-noindex.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-noindex.priority=100"
- "traefik.http.routers.${STACK_NAME}-noindex.service=${STACK_NAME}"
- "traefik.http.routers.${STACK_NAME}-noindex.middlewares=${STACK_NAME}-denyall"
- "traefik.http.middlewares.${STACK_NAME}-denyall.ipAllowList.sourceRange=255.255.255.255/32"
- "coop-cloud.${STACK_NAME}.version="
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
db:
image: pgautoupgrade/pgautoupgrade:17-debian
networks:
- internal
environment:
- POSTGRES_DB=eurooffice
- POSTGRES_USER=eurooffice
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
cap_drop:
- NET_RAW
volumes:
- db:/var/lib/postgresql/data
secrets:
- db_password
# The pgautoupgrade image ships its own HEALTHCHECK (pg_isready, aware of
# an in-progress pg_upgrade).
deploy:
restart_policy:
condition: on-failure
labels:
# doc_changes/task_result hold only transient co-authoring
# session state, never document content (that lives in
# whichever app embeds this server).
- "backupbot.backup=false"
rabbitmq:
image: rabbitmq:4.3.2
networks:
- internal
cap_drop:
- NET_RAW
volumes:
- rabbitmq:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
deploy:
restart_policy:
condition: on-failure
secrets:
jwt:
external: true
name: ${STACK_NAME}_jwt_${SECRET_JWT_VERSION}
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
volumes:
data:
config:
fonts:
db:
rabbitmq:
networks:
proxy:
external: true
internal: