Skip to content
/ orbit Public

Simple & safe zero-downtime deployments for Laravel.

License

Notifications You must be signed in to change notification settings

m1guelpf/orbit

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

🛰️ Put your Laravel sites in Orbit.

Orbit provides a simple way to deploy your Laravel sites to your server in a few seconds.

Get Started

  1. Get the Orbit server up and running on your VPS. You'll need a GitHub token and the server binary (there's a Docker image too!).

    The Orbit server exposes an HTTP API, which you'll need to make accessible to the outside world.

  2. Create an Orbit.toml config file and add your sites to it, like so:
version = 1
token = ""  # Use `openssl rand -base64 32` to generate a random token

[[sites]]
name = "Test Site"
path = "/var/www/test-site"
github_repo = "m1guelpf/laravel-test"
commands = [ # Extra commands to run during the deployment (optional)
    "php horizon:terminate"
]
  1. Create a .github/workflows/deploy.yaml GitHub action, like so:
name: Deploy to prod
on:
    push:
        branches: [main]

jobs:
    deploy:
        runs-on: ubuntu-latest
        steps:
            - name: Deploy to prod
              uses: m1guelpf/orbit@main
              with:
                  site: alexandria # slug of your site, generated from the name above
                  orbit-url: ${{ secrets.ORBIT_URL }} # URL to your Orbit instance
                  orbit-token: ${{ secrets.ORBIT_TOKEN }} # The token you generated on your Orbit config
  1. That's it! Pushing to main will now deploy your site, with no downtime for your users 🎉

Architecture

🌐 Orbit Server

The Orbit Server is the main component of the system. It exposes an HTTP API that lets you trigger deployments and streams the results back in real time. It's the module that actually contains the logic for deploying the sites.

🌠 Orbit Client

To make interacting with the Server easier, the Orbit Client provides a simple Rust interface for calling the API, dealing with serialization and such. If you want to write your own Orbit integration, it'll let you interact with the Server as if it was just another crate.

🐙 Orbit CLI & GitHub Action

To make deployments easier for end users, Orbit also includes a CLI that provides user-friendly live output for deployments. And, if you want to run it from GitHub Actions, it comes packaged into its own GitHub Action, making zero-downtime deployments a one-line change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Simple & safe zero-downtime deployments for Laravel.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Languages