Thanks to visit codestin.com
Credit goes to github.com

Skip to content

magooney-loon/pb-deployer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

pb-deployer

Automates the lifecycle of deploying PocketBase apps to production

Stargazers Contributors AGPL-3.0
Screenshot
**WARNING**HOBBY PROJECT**
Web Demo UI

Ask DeepWiki

🚀 Quick Start

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.