Disco Daemon is the core server-side component of the Disco deployment platform. It runs on your server, acting as the brain and workhorse that manages your applications, automates deployments, and handles the underlying infrastructure.
While this repository contains the daemon's source code, you typically won't interact with it directly. Instead, you'll use the Disco CLI to install, manage, and communicate with the daemon.
Disco is an open-source web deployment platform that lets you host web apps on your own server or Raspberry Pi with the simplicity of a managed PaaS. It helps you Deploy Any Web App, Pay Less, and Own It All.
The Disco ecosystem consists of two main parts:
disco-cli
: The command-line interface you use on your local machine to manage your servers and projects.disco-daemon
(This repo): The agent that runs on your server, executing commands sent by the CLI.
The Disco Daemon is a self-contained system designed for reliability and ease of use. When you initialize a server with disco init
, the CLI installs and configures this daemon for you. From then on, the daemon listens for API requests to carry out tasks.
At its core, the daemon is built on a modern, robust tech stack:
- FastAPI: Exposes a clean, secure REST API for the
disco-cli
to interact with. - Docker Swarm: Manages and orchestrates your applications as containerized services, providing resilience and scalability out of the box.
- Caddy: Provides an integrated, fully-managed reverse proxy with automatic HTTPS, certificate renewal, and zero-config routing for your projects.
- SQLAlchemy & Alembic: Manages the persistent state of your projects, domains, and deployments in a local SQLite database, with seamless schema migrations.
When you deploy a project using git push
or the CLI:
- Trigger: The daemon receives a request via a GitHub webhook or a direct API call.
- Queue: The deployment is added to a queue to be processed sequentially.
- Prepare: The daemon checks out your code, reads the
disco.json
file, and builds a Docker image. - Deploy: A new service is started in Docker Swarm with zero downtime. Caddy automatically configures routing and TLS for any specified domains.
- Cleanup: Once the new version is healthy, the old version is gracefully shut down.
- Zero-Downtime Deployments: Seamlessly rolls out new versions of your applications.
- Automatic HTTPS: Caddy integration provides free, auto-renewing SSL/TLS certificates.
- Git-Based & CLI-Driven Workflows: Deploy via a simple
git push
ordisco deploy
. - Built on Docker Swarm: Leverages a production-grade container orchestrator for stability.
- Extensible with Hooks: Run pre-deployment and post-deployment scripts.
- Self-Contained & Lightweight: Runs efficiently on anything from a large cloud VM to a Raspberry Pi.
You should not clone this repository to get started.
The intended way to use Disco is through the Disco CLI. The CLI will automatically install and manage the daemon on your server for you.
- Install the Disco CLI on your local machine:
curl https://cli-assets.letsdisco.dev/install.sh | sh
- Initialize your server: Point a domain to your server's IP, then run the command below. It will connect via SSH, install Docker, and set up the Disco Daemon.
disco init [email protected]
From there, the CLI will guide you through connecting your GitHub account and deploying your first project.
Interested in contributing to the Disco Daemon? That's great!
We welcome bug reports, feature requests, and pull requests. Please check out the Issues tab or join our Discord to chat with the community.
This project is licensed under the MIT License.