Laravel Jetstream for Local Development
Laravel Jetstream provides a polished application scaffolding for Laravel, featuring authentication, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management features. It serves as the perfect starting point for your next Laravel application.
This recipe provides a comprehensive Laravel Jetstream setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for local development with cost-efficient resource allocation and the Lightweight core package. This means:
- Resources are optimized for development workloads
- Services can be started/stopped as needed during active development
- Cost-effective configuration suitable for development and testing
Environment Overview​
Your newly deployed Laravel Jetstream environment includes:
- A fully configured Laravel application service with Jetstream
- PostgreSQL database integration with migration automation
- Valkey (Redis-compatible KV store) for sessions and cache
- Built-in object storage for filesystem
- Mailpit for development SMTP server
- Automated build and deployment pipeline
- Health and readiness checks
For production environments with high-availability services and enterprise-grade reliability, consider deploying the production environment recipe.
What to Expect​
The deployment process takes just a few minutes. Once complete, you'll receive:
- A live URL to access your application
- Database credentials
- Access to your project dashboard
- CLI configuration details for VPN access
Setting Up Local Development​
Zerops provides a built-in VPN feature through its CLI tool, enabling seamless local development against remote resources. Here's how to set it up:
Prerequisites​
- Install the Zerops CLI and log in with personal access token
- Install Wireguard on your system
Setup Steps​
-
Create your own repository from our GitHub template and clone it locally
-
Configure VPN Access
-
Set Up Environment
Fill in database access details - in Zerops GUI go to the detail of
db
service and open Access details in the left menu. -
Start Development Server
Your local environment is now connected to the Zerops infrastructure, utilizing the database, redis and storage from Zerops while maintaining local development flexibility.
Application Configuration​
The app has been set up to utilize:
- Valkey (Redis-compatible KV store) to handle sessions and cache
- Built-in S3 object storage for Laravel and Jetstream-specific filesystem operations
- Mailpit as a mock SMTP server for development purposes
Your application's deployment process is managed through zerops.yml, which handles:
- Database migrations
- Cache management
- File cleanup
- Health check implementation
- Service orchestration
Try the Build & Deploy Pipeline​
Now that you're logged into zcli, deploying your application is straightforward. Simply enter zcli push
in your terminal from the root of your freshly cloned project.
Test Your Pipeline​
The best way to verify your setup is with a quick test:
- Make a small change directly in the GitHub UI
- Commit the change and watch the magic happen in your project dashboard
Setting Up Automated CI/CD​
To enable automatic deployments:
- Navigate to Pipelines & CI/CD settings in your service dashboard
- Connect the service with your new GitHub repository
- Set the trigger to Push to Branch
Integration with Existing Applications​
If you're looking to integrate an existing Laravel Jetstream application with Zerops, review the changes made over the default installation to understand the necessary modifications.
Get to know Zerops core concepts in depth​
Ready to build from scratch? Our step-by-step Laravel tutorial takes you through the entire process of integrating Zerops with a new Laravel project.
Need help? Join our Discord community.