Preparation
Before deploying your DeploySolo app to production, complete these preparation steps to ensure a smooth deployment process.
1. Build and Test Locally
Ensure your app runs correctly in production mode on your local machine:
# Build the binary
go build -o myapp
# Run with production-like settings
./myapp serve --http="0.0.0.0:8090"
Test all core functionality including authentication, database operations, and any integrated services (Stripe, GitHub invites, etc.).
2. Environment Variables
Create a .env.production file with your production credentials. Never commit this file to version control.
Required variables:
- STRIPE_SECRET_KEY - Your Stripe secret key (if using payments)
- STRIPE_WEBHOOK_SECRET - Stripe webhook signing secret
- STRIPE_PRICE_ID - Your product price ID
- DOMAIN_NAME - Your production domain (e.g., https://yourdomain.com)
- GH_USERNAME - GitHub username (if using invites)
- GH_REPO - GitHub repository name
- GH_PAT - GitHub Personal Access Token
3. Database Migrations
Ensure all migrations are committed to your migrations/ folder. PocketBase will automatically run these on startup. Your migration files should follow the naming pattern <timestamp>_<description>.go.
4. Prepare Static Assets
Verify that your web/public directory contains all necessary assets:
- Vendor libraries (htmx, WebAwesome, etc.)
- Custom CSS and JavaScript
- Images and fonts
If using symlinks (as in the examples), you’ll need to either copy the actual files or ensure the symlink targets are available on the server.
5. Domain and DNS
- Register your domain
- Point your domain’s A record to your server’s IP address (you’ll get this after setting up EC2)
- Caddy will handle SSL certificates automatically via Let’s Encrypt
6. Security Checklist
- [ ] Remove or secure any debug endpoints
- [ ] Set strong admin credentials for PocketBase
- [ ] Review CORS settings if serving APIs to external clients
- [ ] Ensure
.envfiles are in.gitignore - [ ] Plan your backup strategy for the SQLite database
Once these steps are complete, proceed to AWS EC2 deployment.