Mastodon
Docker Compose
Rails Secret
docker compose run --rm web bin/rails secret
VAPID Key
docker compose run --rm web bin/rails mastodon:webpush:generate_vapid_key
DB/Redis Host
Set DB Host and Redis Host:
REDIS_HOST=redis
DB_HOST=db
Encryption Secrets
docker compose run --rm web bin/rails db:encryption:init
# Do NOT change these variables once they are set
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=xxx
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=xxx
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=xxx
DB Setup
docker compose exec db psqlrun -U-rm postgresweb bin/rails db:setup
CREATE USER mastodon WITH PASSWORD 'ohyeah';
CREATE DATABASE mastodon OWNER mastodon;
GRANT ALL PRIVILEGES ON DATABASE mastodon TO mastodon;