Files
maubot/compose.yml
2026-03-12 15:10:57 +01:00

70 lines
2.3 KiB
YAML

---
version: "3.8"
services:
app:
image: dock.mau.dev/maubot/maubot:v0.6.0
environment:
- HOMESERVER_HOST
- HOMESERVER_URL
- ADMIN_USER_NAME
secrets:
- admin_password
- homeserver_registration
volumes:
- maubot_data:/data:rw
networks:
- proxy
configs:
- source: maubot_config
target: /data/config.yaml
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=29316"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Redirect from EXTRA_DOMAINS to DOMAIN
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.regex=^http[s]?://([^/]*)/(.*)"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.replacement=https://${DOMAIN}/$${2}"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.permanent=true"
## Redirect HTTP to HTTPS
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.permanent=true"
## When you're ready for release, run "abra recipe sync <name>" to set this
- "coop-cloud.${STACK_NAME}.version=1.1.0+v0.6.0"
## Enable backups: https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-configure-backuprestore
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://0.0.0.0:29316/_matrix/maubot/"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
networks:
proxy:
external: true
configs:
maubot_config:
name: ${STACK_NAME}_config_yaml_${MAUBOT_CONFIG_VERSION}
file: config.yaml.tmpl
template_driver: golang
volumes:
maubot_data:
secrets:
admin_password:
external: true
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
homeserver_registration:
external: true
name: ${STACK_NAME}_homeserver_registration_${SECRET_HOMESERVER_REGISTRATION_VERSION}