Tutorial · Velin · 08.06.2026

VelinDeploy: Erstes Deployment mit Backup, Health Check und Rollback

VelinDeploy CLI installieren, .velin-deploy.yml für ein Laravel-Projekt konfigurieren und die komplette Pipeline ausführen — inklusive Git-Sicherheit und Webhook-Tipp.

Velin Tutorial

VelinDeploy Quickstart

CLI · Backup · Rollback

Framework-agnostische Deploy-Pipeline: Git Pull, Backup, Deploy-Skript, Health Check — mit automatischem Rollback bei Fehlern.

VelinDeploy bringt Code sicher auf den Server. Die CLI ist kostenlos auf Ihrem VPS nutzbar; Portal und Agent erweitern die Steuerung um Webhooks, Release-Historie und Remote-Deploys. Dieses Tutorial zeigt den Self-hosted-Weg mit einem Laravel-Projekt — dieselbe Pipeline funktioniert auch für Next.js, statische Sites oder Custom-Stacks.

Wichtig vorab: VelinDeploy lädt Ihre Live-Daten nicht zu Git hoch. .env, storage/, Uploads und die Datenbank bleiben auf dem Server.

Git & Datenschutz

Ins Repository gehört nur Quellcode. .env, vendor/, node_modules/, storage/ und DB-Dumps stehen in .gitignore. Der Server pullt Updates — er pusht nicht automatisch.

Pipeline-Ablauf

  1. 01

    Lock

    Verhindert parallele Deploys auf demselben Projekt.

  2. 02

    Backup

    Datei-Snapshot vor jedem Deploy — Basis für Rollback.

  3. 03

    Git Pull

    Fetch und fast-forward Pull auf dem konfigurierten Branch.

  4. 04

    Deploy-Skript

    Ihr Hook — z. B. composer install, npm run build, migrate.

  5. 05

    Health Check

    HTTP-Prüfung mit Retries — Go-Live nur bei Erfolg.

  6. 06

    Rollback

    Bei Health-Fail: Dateien und Git-SHA automatisch zurücksetzen.

Schritt 1 — CLI installieren

git clone /var/www/velin-deploy
cd velin-deploy
python3 -m venv .venv
.venv/bin/pip install -e .

Schritt 2 — Projekt initialisieren

velin-deploy init /var/www/my-app --name my-app
Im Projektverzeichnis liegt danach .velin-deploy.yml. Pfad, Deploy-Skript und Health-URL anpassen:
Beispiel .velin-deploy.yml yaml
name: my-app
path: /var/www/my-app
git:
  remote: origin
  branch: main
backup:
  enabled: true
  dir: /var/www/backups/velindeploy
  keep: 5
deploy:
  script: scripts/deploy-production.sh
  timeout_seconds: 900
health:
  url: https://my-app.example/up
  retries: 3
  timeout_seconds: 30
  interval_seconds: 5
rollback:
  on_health_failure: true
  restore_files: true
  git_reset: true

Schritt 3 — Deploy-Skript (Laravel)

Typisches Laravel-Skript: Dependencies, Assets bauen, Migrationen, Cache — danach Queue/Worker neu starten.
scripts/deploy-production.sh shell
#!/usr/bin/env bash
set -euo pipefail
cd /var/www/my-app
php artisan down --retry=60 || true
composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader
npm ci && npm run build
php artisan migrate --force
php artisan optimize
php artisan up
systemctl restart my-app-queue.service

Schritt 4 — Pipeline starten

velin-deploy run --project /var/www/my-app
terminal
// VelinDeploy Pipeline
velin-deploy run --project /var/www/my-app

Lock acquired
Backup: snap-20260528.tar.gz
Git: abc1234 -> def5678
Deploy script: OK
Health: https://my-app.example/up OK
Release saved

Nützliche Einzelbefehle

CLI-Referenz

  • velin-deploy pull — nur Git Pull
  • velin-deploy backup — Snapshot ohne Deploy
  • velin-deploy health — Health-URL prüfen
  • velin-deploy releases list — Release-Historie
  • velin-deploy rollback --confirm — letztes Release wiederherstellen

Webhook & CI (optional)

Für Deploy bei Push auf main: Webhook-Receiver starten und projects.yml mit Pfad, Branch und Secret konfigurieren. Endpoint: POST /velin-deploy/webhook/{project_slug}. Details in der VelinDeploy-Dokumentation unter docs/webhook.md.

Velin-Ökosystem

Nach Go-Live optional Velin Puls für Uptime-Monitoring aktivieren — VelinSentinel für Server-Security im Betrieb.

CLI bleibt kostenlos — Portal Starter ab 19 €/Monat für Webhooks und Deploy per Klick.

Pläne ansehen
Quelle: https://birdapi.de/blog/tutorials-velin/velin-deploy-erstes-deployment