Create a project with Spin
Getting up an running with Spin is very easy. It's recommended to install Spin globally so you can easily create new projects. Follow the installation instructions for macOS, Linux, or Windows before continuing. We'll walk you through the process of creating a new Laravel project with Spin.
Let's create a new Laravel project
For our example, we will walk you though how to create a new Laravel project with Spin. We have a command called spin new
, which will take care of the heavy lifting for you
Create a new Laravel project called "my-billion-dollar-idea"
spin new laravel my-billion-dollar-idea
This will create a project in your current directory called my-billion-dollar-idea
. You can also specify a path to create the project in a different directory.
Assuming you completed the prerequisites, the onboard wizard will take you through the process so you can get a local development environment with spin up
.
Further Configuration
Since we're using the Laravel Basic template, it's important to review the project's README file for any additional steps required after creating the project.
Regardless of what template you're using, it's always important to review the template's README file for any additional steps required after creating the project. You may need to customize project URLs, environment variables, or other settings to get your project up and running.
Once you have things configured, it could be possible to stop here and just have Spin manage your development environment -- but you won't get the full benefit of Spin.
Spin is designed to keep your infrastructure 100% the same, no matter the environment. In the remainder of this guide, we'll show you how to deploy your project to a server.
Choosing a deployment strategy
Spin offers two deployment strategies:
spin deploy
(simple)- GitHub Actions (advanced)
spin deploy | GitHub Actions | |
---|---|---|
Difficulty | Very Easy | Complex (it's automated CI/CD after all ðĪŠ) |
Team Size | Small teams | Small to very large teams |
Zero-downtime Deployments | â | â |
Automated Testing | â | â (you have to configure this though) |
spin deploy
(simple)
If you're a small team or bootstrapping a project to get it out the door as fast as possible, spin deploy
might be your best friend.
Without the headache of CI/CD, spin deploy
will perform a zero-downtime deployment from your local machine to your server directly over SSH. There are no requirements for having a CI/CD pipeline or private Docker registries.
Read more about spin deploy
in the command reference.
GitHub Actions (advanced)
For GitHub Actions, we created an entire guide on how to achieve zero-downtime deployments with GitHub Actions. This is a more advanced strategy, but it's worth it if you're looking to automate your deployments.
Learn more about GitHub Actions deployments â
Deploying to a server
Although it is possible to just use Spin for local development only, you'll get the full benefit of Spin when you use it to deploy your application to a server.
Use the guide below to learn how to get your servers ready for a Spin deployment: