An open API service indexing awesome lists of open source software.

https://github.com/magooney-loon/pb-deployer

pocketbase deployer
https://github.com/magooney-loon/pb-deployer

automation pocketbase self-hosted sveltekit vps-deployment

Last synced: 4 months ago
JSON representation

pocketbase deployer

Awesome Lists containing this project

README

          


Logo

pb-deployer


Automates the lifecycle of deploying PocketBase apps to production


Stargazers
Contributors
AGPL-3.0


Screenshot
**WARNING**HOBBY PROJECT**

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/magooney-loon/pb-deployer)

## 🚀 Quick Start

```bash
git clone https://github.com/magooney-loon/pb-deployer
cd pb-deployer
go run cmd/scripts/main.go --install
```

## Core Workflow

1. **Server Registration**: Add remote host connection details
2. **Server Setup**: Automated user creation and directory structure
3. **Security Lockdown**: Firewall, fail2ban, disable root SSH (Optional)
4. **App Deployment**: Upload prod dist, systemd service creation
5. **Version Management**: Rollback support with file storage

## Directory Structure

```
/opt/pocketbase/
├── apps/ # Application deployments (per app directory)
├── backups/ # Deployment backups (timestamped)
├── logs/ # Application logs
└── staging/ # Temporary staging during deployments
```

## Deployment Steps

1. **Downloading and staging deployment package**
2. **Checking service status**
3. **Stopping existing service**
4. **Creating backup of current deployment**
5. **Preparing deployment directory**
6. **Installing new version**
7. **Creating/updating systemd service**
8. **Creating superuser (if initial deployment)**
9. **Starting service**
10. **Verifying & finalizing deployment**


Logo

See `**/*/README.md` for detailed docs.

Make sure you loaded your SSH keys, check with `ssh-add -l`

## Contribution
PRs are encouraged, but consider opening a discussion first for minor/major changelogs.