4.4 is end-of-life. Moved by mongodump/mongorestore into a new volume
(heyform_database7); the 4.4 volume stays for rollback.
The restore also fixes a data mix-up. From Nov 2024 the compose file set
MONGO_URI='mongodb://mongo:27017/heyform' in list form, so the quotes
became part of the value and HeyForm used a database literally named
"heyform'". The v3 upgrade (a1a79af) dropped the quotes, which switched
HeyForm to the old "heyform" database from the first week of setup, so
the real Repairs and Volunteer forms (91 submissions) disappeared. The new
volume holds "heyform'" restored as "heyform". Tested first with v3 on a
throwaway Mongo 7.0: both forms load.
Backups: ~/backups/heyform-mongo4.4-20261109 on the server (dump of both
databases + tar of the 4.4 volume).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
1.9 KiB
Django/Jinja
65 lines
1.9 KiB
Django/Jinja
services:
|
|
heyform:
|
|
# :latest is only moved by v* release tags (no RCs)
|
|
image: heyform/community-edition:latest
|
|
restart: always
|
|
labels:
|
|
mag37.dockcheck.update: true
|
|
volumes:
|
|
# Persist uploaded images
|
|
- assets:/app/packages/server/static/upload
|
|
depends_on:
|
|
- mongo
|
|
- redis
|
|
environment:
|
|
- APP_HOMEPAGE_URL=https://{{ subdomains.heyform }}
|
|
# Only Caddy may set X-Forwarded-For
|
|
- TRUST_PROXY={{ docker.hairpin_ip }}
|
|
# No public sign-up; new people join through workspace invitations
|
|
- APP_DISABLE_REGISTRATION=true
|
|
- SESSION_KEY={{ vault_heyform.session_key }}
|
|
- FORM_ENCRYPTION_KEY={{ vault_heyform.encryption_key }}
|
|
- INTEGRATION_ENCRYPTION_KEY={{ vault_heyform.integration_encryption_key }}
|
|
- MONGO_URI=mongodb://mongo:27017/heyform
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- SMTP_FROM=nerderland@{{ email_domains.updates }}
|
|
- SMTP_HOST={{ smtp.host }}
|
|
- SMTP_PORT=465
|
|
- SMTP_USER={{ smtp.username }}
|
|
- SMTP_PASSWORD={{ vault_smtp.password }}
|
|
- SMTP_SECURE=true
|
|
|
|
mongo:
|
|
# 7.0 is the newest Mongo that HeyForm's driver (mongodb 5.9) supports.
|
|
# Moved from 4.4 by dump/restore into a new volume on 2026-11-09; the old
|
|
# 4.4 volume (heyform_database) is kept for rollback.
|
|
image: percona/percona-server-mongodb:7.0
|
|
restart: always
|
|
volumes:
|
|
# Persist MongoDB data
|
|
- database7:/data/db
|
|
|
|
redis:
|
|
# v3 needs Redis 8 commands (HGETDEL), so KeyDB no longer works
|
|
image: redis:8-alpine
|
|
restart: always
|
|
command: redis-server --appendonly yes
|
|
labels:
|
|
mag37.dockcheck.update: true
|
|
volumes:
|
|
- redis:/data
|
|
|
|
volumes:
|
|
assets:
|
|
driver: local
|
|
database7:
|
|
driver: local
|
|
redis:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
external: true
|
|
name: {{ docker.network_name }}
|