Files
pb/README.md
2026-01-13 15:02:07 +00:00

39 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# pb
A simple, rsync-based PocketBase deployment tool.
## Commands
### `init`
Start a new PocketBase project (optionally provide a service name via `pb init <name>`)
### `dev`
Run the local dev server.
### `deploy`
Syncs `pb_public`, `pb_migrations`, and `pb_hooks`, then restarts the remote PocketBase service. The command will automatically run `setup` if the PocketBase binary isnt present on the remote.
### `setup`
Provision a remote PocketBase server. This will:
1. Setup up a firewall.
2. Install and setup Caddy.
3. Download pocketbase and configure remote secrets.
4. Configure systemd.
### `logs`
Connects to the configured server and streams `/root/pb/{service}/{service}.log` via `tail -n 100 -F`.
### `secrets`
Manage the remote secrets in `/root/pb/{service}/.env`.
- `pb secrets list` prints every variable name (comments and empty lines are ignored).
- `pb secrets set KEY=VALUE [...]` adds or updates one or more key/value pairs while leaving the other file entries untouched.
- `pb secrets delete KEY [...]` removes the named entries.