1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-04-26 02:15:22 -04:00

add note about db:migrate

This commit is contained in:
Jake Jarvis 2022-12-11 10:09:04 -05:00
parent a520efcc55
commit 89ccd7fd2a
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39

View File

@ -19,6 +19,14 @@ echo "pgbouncer password (save this securely): $DB_PASSWORD"
echo "CREATE USER pgbouncer WITH PASSWORD '$DB_PASSWORD' CREATEDB" | sudo -u postgres psql -f -
```
#### Running database migrations
Mastodon `db:migrate`s should be pointed directly at Postgres (default port: 5432), ***not through PgBouncer***, by overriding `DB_PORT` env variable.
```bash
RAILS_ENV=production DB_PORT=5432 bundle exec rails db:migrate
```
#### Config
.env.production:
@ -67,6 +75,10 @@ generate md5 hash of postgres passwords with `echo -n "pass" | md5sum`
## Connecting from TablePlus.app via Tailscale
Connect directly to Postgres (default port: 5432), ***not via PgBouncer!***
---
/etc/postgresql/15/main/postgres.conf
```