Add Cut (self-hosted URL shortener) template (#914)

This commit is contained in:
Mendy Landa
2026-07-07 22:41:57 +03:00
committed by GitHub
parent a2bf4b1393
commit 5bbc380f36
4 changed files with 77 additions and 0 deletions

10
blueprints/cut/cut.svg Normal file
View File

@@ -0,0 +1,10 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Cut logo">
<rect width="64" height="64" rx="16" fill="#059669"/>
<g transform="translate(14 14) scale(1.5)" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="6" cy="6" r="3"/>
<path d="M8.12 8.12 12 12"/>
<path d="M20 4 8.12 15.88"/>
<circle cx="6" cy="18" r="3"/>
<path d="M14.8 14.8 20 20"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 494 B

View File

@@ -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:

View File

@@ -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}"

View File

@@ -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",