From 5bbc380f36ba534b4382c6354c568ed188d7ebd2 Mon Sep 17 00:00:00 2001 From: Mendy Landa <54242706+MendyLanda@users.noreply.github.com> Date: Tue, 7 Jul 2026 22:41:57 +0300 Subject: [PATCH] Add Cut (self-hosted URL shortener) template (#914) --- blueprints/cut/cut.svg | 10 +++++++++ blueprints/cut/docker-compose.yml | 37 +++++++++++++++++++++++++++++++ blueprints/cut/template.toml | 14 ++++++++++++ meta.json | 16 +++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 blueprints/cut/cut.svg create mode 100644 blueprints/cut/docker-compose.yml create mode 100644 blueprints/cut/template.toml diff --git a/blueprints/cut/cut.svg b/blueprints/cut/cut.svg new file mode 100644 index 00000000..c0604eac --- /dev/null +++ b/blueprints/cut/cut.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/blueprints/cut/docker-compose.yml b/blueprints/cut/docker-compose.yml new file mode 100644 index 00000000..b31578d1 --- /dev/null +++ b/blueprints/cut/docker-compose.yml @@ -0,0 +1,37 @@ +services: + cut: + image: ghcr.io/mendylanda/cut:latest + restart: unless-stopped + depends_on: + redis: + condition: service_healthy + environment: + # Injected by Dokploy from template.toml (generated strong password). + - ADMIN_PASSWORD=${ADMIN_PASSWORD} + # Bundled Redis below, private to the project network. + - REDIS_URL=redis://redis:6379 + # Expose the container port only; Dokploy maps the domain to it. + ports: + - 3000 + healthcheck: + test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"] + interval: 10s + timeout: 5s + retries: 10 + + redis: + image: redis:7-alpine + restart: unless-stopped + # appendonly = durable across restarts; noeviction because this is Cut's + # primary datastore, not a cache (don't drop links under memory pressure). + command: redis-server --appendonly yes --maxmemory-policy noeviction + volumes: + - redis-data:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 10 + +volumes: + redis-data: diff --git a/blueprints/cut/template.toml b/blueprints/cut/template.toml new file mode 100644 index 00000000..83de686c --- /dev/null +++ b/blueprints/cut/template.toml @@ -0,0 +1,14 @@ +[variables] +main_domain = "${domain}" +admin_password = "${password:24}" + +[config] +env = [ + "ADMIN_PASSWORD=${admin_password}", +] +mounts = [] + +[[config.domains]] +serviceName = "cut" +port = 3000 +host = "${main_domain}" diff --git a/meta.json b/meta.json index 4afcfd83..7c6451dd 100644 --- a/meta.json +++ b/meta.json @@ -1732,6 +1732,22 @@ "self-hosted" ] }, + { + "id": "cut", + "name": "Cut", + "version": "0.1.0", + "description": "A tiny, self-hosted URL shortener — short links that are entirely yours, with per-link passwords, expiries, and click limits.", + "logo": "cut.svg", + "links": { + "github": "https://github.com/MendyLanda/cut", + "website": "https://github.com/MendyLanda/cut", + "docs": "https://github.com/MendyLanda/cut#readme" + }, + "tags": [ + "url-shortener", + "links" + ] + }, { "id": "cyberchef", "name": "CyberChef",