Skip to content

panic-Patrick/coolify-badge-service

Repository files navigation

Example

flat

Deployment Status

flat square

Deployment Status

plastic

Deployment Status

for-the-badge

Deployment Status

social

Deployment Status

Coolify Deployment Badge Service (Next.js)

Generates live SVG status badges for Coolify apps.

Features

  • Badge SVGs with strict no-cache headers
  • Custom label and style (Shields presets)
  • Status-to-color mapping in one place
  • Simple UI with copy buttons and optional login gate

Quickstart

npm install
npm run dev
# open http://localhost:3000/

For production:

npm run build
npm start   # uses PORT

Configuration

Create .env.local (do not commit secrets):

COOLIFY_API_URL=https://cool.coolify.dev
API_TOKEN=your_token_here
PORT=3000
SITE_PASSWORD=change_me      # protects the UI; badges remain public

Endpoints

  • /api/health{ status: "ok" }
  • /api/badge/:app_uuid → SVG badge (no-cache)

Badge Usage

Markdown example:

![Deployment Status](https://your-domain/api/badge/your-app-uuid)

Query options:

  • ?label=Text overrides left text
  • ?style=for-the-badge selects a Shields style
  • ?type=service targets services instead of applications (default tries applications, then services)

Status Mapping

Colors/texts live in app/api/badge/status-config.ts. Default mapping:

  • finished → Live → #3fb950
  • running:healthy → Live → #3fb950
  • failed → Failed → #f85149
  • in_progress → Deploying → #2188ff
  • queued → Queued → #6e7681
  • no_history → No history → #d1d5da
  • unauthorized → Unauthorized → #cea61b
  • offline/other → Offline/raw key → #cea61b

UI Builder

  • Access the builder at / (login required if SITE_PASSWORD is set).
  • Configure App UUID, label, host override, badge style, and target (auto/application/service); copy URL/Markdown; preview updates live.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published