GitHub repository: click here.
I built a self-hosted CI/CD tool specifically for Swift server apps powered by the Vapor framework. When you git push new code to your app's repository, Deployer intercepts this using webhooks. It then builds your app (swift build) and restarts it on your server.
A reactive live dashboard provides real time build output streams and deployment status changes, as well as start and stop buttons for your app and run buttons for the commits pushed on main. You can either use manual mode where deployments only start by pressing the run button in the panel, or automatic mode, where deployments happen instantly once new code is pushed. Only one build can run at a time; the last commit wins when multiple are pushed concurrently.
Most Swift server deploy setups I’ve tried ended up being a mix of shell scripts, GitHub Actions, and manual SSH steps. I wanted something simpler that allows for quick interation and production testing while being fully self-hosted. Deployer handles initial server setup through an automated and interactive CLI command, so it’s suitable even for developers that are new to server-side Swift.
Tech Stack
Setup
To bootstrap on a fresh Ubuntu VPS, run (as root):
bash <(curl -sSL https://mottzi.codes/deployer/setup.sh)
-
Installs Swift (via Swiftly).
-
Configures Nginx reverse proxy
-
Issues TLS certificates (using Let's encrypt).
-
Sets up the GitHub webhook and deploy key.
-
Brings your app online.
Control
You manage Deployer via deployerctl, for example:
sudo deployerctl start # starts deployer and app
sudo deployerctl status app
sudo deployerctl stop deployer
sudo deployerctl update # updates deployer itself
I'm interested in your thoughts and feedback. This release is pretty bear bones feature wise. It may have some rough edges, especially the front-end. You are very welcome to contribute, if you choose so.
