FTL (Faster Than Light) is a powerful deployment tool designed specifically for developers who want to deploy their applications to popular cloud providers like Hetzner, DigitalOcean, Linode, or even Raspberry Pi and other servers but aren't sure where to start. FTL simplifies the process of setting up servers and deploying applications, making deployment easy and reliable, even for those who aren't experts in server management or advanced deployment techniques.
There are several ways to install FTL:
If you're using Homebrew, you can install FTL using the following commands:
brew tap yarlson/ftl
brew install ftl
You can download the pre-compiled binary for your operating system and architecture from the GitHub Releases page. After downloading, follow these steps:
For example, on Linux or macOS:
tar -xzf ftl_*.tar.gz
chmod +x ftl
sudo mv ftl /usr/local/bin/
To install FTL from source, you need to have Go installed on your system. Then, you can use the following command:
go install github.com/yarlson/ftl@latest
Create an ftl.yaml
file in your project root. Here's an example:
project:
name: my-project
domain: my-project.example.com
email: my-project@example.com
servers:
- host: my-project.example.com
port: 22
user: my-project
ssh_key: ~/.ssh/id_rsa
services:
- name: my-app
image: my-app:latest
port: 80
health_check:
path: /
interval: 10s
timeout: 5s
retries: 3
routes:
- path: /
strip_prefix: false
storages:
- name: postgres
image: postgres:16
- postgres_data:/var/lib/postgresql/data
env:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres_data
This configuration defines your project, servers, services, and storage requirements.
FTL provides three main commands: setup
, build
, and deploy
.
The setup
command prepares your servers for deployment:
ftl setup
This command:
Run this command once for each new server before deploying.
The build
command builds Docker images for your services:
ftl build
This command:
You can use the --no-push
flag to build images without pushing them to the registry:
ftl build --no-push
The deploy
command is where the magic happens. It deploys your application to all configured servers:
ftl deploy
This command:
ftl.yaml
file to understand your infrastructure.FTL uses a sophisticated deployment process to ensure your application is always available, even during updates. Here's what happens when you run ftl deploy
:
FTL reads your ftl.yaml
file to understand your infrastructure.
It securely connects to each server using SSH.
A dedicated Docker network is created for your project, ensuring proper isolation.
The latest versions of your Docker images are pulled to ensure you're deploying the most recent code.
For each service:
This process ensures that your application remains available throughout the update.
An Nginx proxy is automatically configured to route traffic to your services, handle SSL/TLS, and provide automatic HTTPS.
Any unused resources are cleaned up to keep your server tidy.
The entire process is automatic and requires no manual intervention. You can deploy updates as frequently as needed without worrying about downtime or complex deployment procedures.
To contribute to FTL, clone the repository and install the dependencies:
git clone https://github.com/yarlson/ftl.git
cd ftl
go mod download
Run the tests:
go test ./...
We welcome contributions! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is invaluable. Please ensure that your code follows the project's coding standards and that all tests pass before submitting.
Feel free to reach out or open an issue on our GitHub repository if you have any questions or need assistance getting started with FTL!