mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-08 21:05:21 +00:00
Users() optimization to help with startup time
This commit is contained in:
@@ -22,13 +22,22 @@ pgimport \
|
||||
--auth-file /var/lib/ntfy/user.db \
|
||||
--web-push-file /var/lib/ntfy/webpush.db
|
||||
|
||||
# Using --create-schema to set up PostgreSQL schema automatically
|
||||
pgimport \
|
||||
--create-schema \
|
||||
--database-url "postgres://user:pass@host:5432/ntfy?sslmode=require" \
|
||||
--cache-file /var/cache/ntfy/cache.db \
|
||||
--auth-file /var/lib/ntfy/user.db \
|
||||
--web-push-file /var/lib/ntfy/webpush.db
|
||||
|
||||
# Using server.yml (flags override config values)
|
||||
pgimport --config /etc/ntfy/server.yml
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- PostgreSQL schema must already be set up (run ntfy with `database-url` once)
|
||||
- PostgreSQL schema must already be set up, either by running ntfy with `database-url` once,
|
||||
or by passing `--create-schema` to pgimport to create the initial schema automatically
|
||||
- ntfy must not be running during the import
|
||||
- All three SQLite files are optional; only the ones specified will be imported
|
||||
|
||||
|
||||
Reference in New Issue
Block a user