Skip to content

Kayleexx/tsuki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tsuki

Tiny self hosted deployment platform built in Rust.

Tsuki builds container images locally, ships them over SSH, runs them remotely with Docker, and automatically configures reverse proxy routing using Caddy.

Features

  • Automatic app detection
  • Local Docker image builds
  • Artifact export and transfer over SSH
  • Remote Docker image loading
  • Automatic container deployment
  • Automatic port allocation
  • Reverse proxy configuration with Caddy
  • Health checks after deployment
  • Deployment history tracking with SQLite
  • Runtime status inspection
  • Automatic sslip.io domain routing
  • Rollback foundation

Architecture

Developer
    ↓
Tsuki CLI
    ↓ SSH
Remote Host
 ├── Docker
 ├── Caddy
 └── SQLite metadata

Requirements

Local machine

  • Rust
  • Docker
  • OpenSSH client

Remote machine

  • Docker
  • Caddy
  • OpenSSH server

Installation

Clone the repository:

git clone https://github.com/Kayleexx/tsuki.git
cd tsuki

Build the project:

cargo build

Remote Host Setup

Install Docker:

sudo apt install docker.io
sudo systemctl enable --now docker

Install Caddy:

sudo apt install caddy
sudo systemctl enable --now caddy

Install OpenSSH server:

sudo apt install openssh-server
sudo systemctl enable --now ssh

Add passwordless sudo rules for Tsuki:

sudo visudo -f /etc/sudoers.d/tsuki

Add:

your-user ALL=(ALL) NOPASSWD: /usr/bin/tee, /usr/bin/systemctl, /usr/bin/caddy

Example App

Example Dockerfile:

FROM python:3.12-alpine

WORKDIR /app

RUN echo 'hello from tsuki' > index.html

CMD ["python", "-m", "http.server", "80"]

Deploying

From inside your app directory:

cargo run -- deploy .

Example output:

✓ Starting deployment
✓ Building container
✓ Uploading artifact
✓ Loading remote image
✓ Allocating port 8000
✓ Configuring reverse proxy
✓ Running health checks

Application live at:
https://test-app.192.168.0.47.sslip.io

Deployment History

Deployments are stored in SQLite.

Example:

sqlite3 ~/.tsuki/tsuki.db
SELECT * FROM deployments;

Status Inspection

cargo run -- status test-app

Example:

APP:        test-app
STATUS:     running
PORT:       8000
IMAGE:      tsuki-app:1778533905
CONTAINER:  abc123

Rollback

cargo run -- rollback test-app

Current Limitations

  • Single host deployments
  • Single Caddyfile configuration
  • No authentication layer
  • No orchestration or clustering
  • No automatic scaling

demo

image image

About

a lightweight self-hosted PaaS inspired by Heroku , Fly.io , and Dokku without Kubernetes complexity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages