Deploy Your First App
This guide walks you through deploying your first application with brdz from start to finish.
Prerequisites
Section titled “Prerequisites”- brdz CLI installed (Installation Guide)
- A static website or application to deploy
- Basic command-line knowledge
Step 1: Prepare Your Application
Section titled “Step 1: Prepare Your Application”Build your application and ensure it’s ready for deployment:
# Example: Build a React appnpm run build
# Example: Build a static sitenpm run generate
# Verify the output directory existsls dist/ # or public/, build/, etc.Step 2: Package Your Application
Section titled “Step 2: Package Your Application”Create a ZIP archive of your application:
# Navigate to your build outputcd dist/
# Create the ZIP filezip -r ../release.zip .
# Go back to project rootcd ..
# Verify the ZIP was createdls -lh release.zipStep 3: Create an Account
Section titled “Step 3: Create an Account”If you haven’t already, create a brdz account:
brdz accounts:createFollow the prompts to enter your details.
Step 4: Authenticate
Section titled “Step 4: Authenticate”Login to get your API key:
brdz auth:loginEnter your credentials when prompted. Your API key will be stored in ~/.brdz/credentials.
Step 5: Create a Project
Section titled “Step 5: Create a Project”Create a project to organize your apps:
brdz projects:create my-first-projectChoose a descriptive project slug that represents your work.
Step 6: Set Project Context
Section titled “Step 6: Set Project Context”Set your newly created project as the current context:
brdz ctx:useSelect your project from the interactive list.
Step 7: Create an App
Section titled “Step 7: Create an App”Create an application within your project:
brdz apps:create my-first-appChoose a meaningful app name.
Step 8: Set App Context
Section titled “Step 8: Set App Context”Update your context to include the app:
brdz ctx:useSelect your app from the list.
Step 9: Deploy!
Section titled “Step 9: Deploy!”Upload your release:
brdz releases:create release.zipYour application is now deployed! The release will be automatically activated.
Step 10: Verify Deployment
Section titled “Step 10: Verify Deployment”Check that your release was created:
brdz releases:listYou should see your release with an “active” status.
Next Steps
Section titled “Next Steps”Add a Custom Domain
Section titled “Add a Custom Domain”brdz hostnames:create example.comSee the Custom Domains Guide for DNS configuration.
Deploy an Update
Section titled “Deploy an Update”# Make changes to your application# Rebuildnpm run build
# Packagecd dist && zip -r ../release-v2.zip . && cd ..
# Deploybrdz releases:create release-v2.zipRollback if Needed
Section titled “Rollback if Needed”# List releasesbrdz releases:list
# Rollback to previous releasebrdz releases:rollback <previous-release-id>Troubleshooting
Section titled “Troubleshooting”Upload Failed
Section titled “Upload Failed”If the upload fails:
- Check your network connection
- Verify the ZIP file isn’t corrupted:
unzip -t release.zip - Ensure you’re authenticated:
cat ~/.brdz/credentials
Wrong Context
Section titled “Wrong Context”If commands fail with “no project in context”:
# Verify contextbrdz ctx:get
# Reset contextbrdz ctx:useAuthentication Issues
Section titled “Authentication Issues”If you get authentication errors:
# Re-authenticatebrdz auth:loginComplete Example
Section titled “Complete Example”Here’s a complete workflow from start to finish:
# Install brdzbrew tap boardsofmusic/brdzbrew install brdz
# Setupbrdz accounts:createbrdz auth:login
# Create project and appbrdz projects:create my-websitebrdz ctx:use # Select projectbrdz apps:create webbrdz ctx:use # Select app
# Build and deploynpm run buildcd dist && zip -r ../release.zip . && cd ..brdz releases:create release.zip
# Add custom domainbrdz hostnames:create www.example.com
# Done!echo "Application deployed successfully!"