Laravel Minimal for Local Development
This recipe provides a streamlined Laravel setup with PostgreSQL database 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 environment includes:
- A fully configured Laravel application service
- PostgreSQL database integration with migration automation
- 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 remote PostgreSQL database while maintaining local development flexibility.
Application Configuration
Your application's deployment process is managed through zerops.yaml, 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 detail
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 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.