Files
heyform/compose.yml
2026-03-09 11:30:24 -04:00

108 lines
3.4 KiB
YAML

---
services:
app:
image: heyform/community-edition:v3.0.0-rc.5
volumes:
- assets:/app/static/upload
environment:
APP_HOMEPAGE_URL: https://${DOMAIN}
SESSION_KEY_FILE: /run/secrets/session_key
# NOTE: Beware misaligned names here (to avoid long docker secret name)
FORM_ENCRYPTION_KEY_FILE: /run/secrets/form_enc_key
MONGO_URI: 'mongodb://mongo:27017/heyform'
REDIS_HOST: keydb
REDIS_PORT: 6379
SMTP_FROM:
SMTP_HOST:
SMTP_PORT:
SMTP_USER:
SMTP_SECURE:
SMTP_IGNORE_CERT:
APP_DISABLE_REGISTRATION:
APP_LISTEN_PORT: 9157
configs:
- source: abra_entrypoint_conf
target: /abra-entrypoint.sh
mode: 0555
secrets:
- session_key
- form_enc_key
entrypoint: [ "/abra-entrypoint.sh" ]
networks:
- proxy
- internal
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=9157"
- "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}"
# Edit the following line if you are using one, but not both, "Redirect" sections below
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname"
# 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=0.1.0+v3.0.0-rc.5"
## Enable backups: https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-configure-backuprestore
- "backupbot.backup=true"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:9157"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
mongo:
image: percona/percona-server-mongodb:4.4
volumes:
- mongodb:/data/db
networks:
- internal
deploy:
labels:
- "backupbot.backup=true"
keydb:
image: eqalpha/keydb:x86_64_v6.3.3
command: keydb-server --appendonly yes --protected-mode no
volumes:
- keydb:/data
networks:
- internal
deploy:
labels:
- "backupbot.backup=true"
networks:
proxy:
external: true
internal:
volumes:
assets:
mongodb:
keydb:
secrets:
session_key:
external: true
name: ${STACK_NAME}_session_key_${SECRET_SESSION_KEY_VERSION}
form_enc_key:
external: true
name: ${STACK_NAME}_form_enc_key_${SECRET_FORM_ENC_KEY_VERSION}
configs:
abra_entrypoint_conf:
name: ${STACK_NAME}_abra_entrypoint_conf_${ABRA_ENTRYPOINT_CONF_VERSION}
file: abra-entrypoint.sh.tmpl
template_driver: golang