Changeset d2b7247 in Klonkt for deploy


Ignore:
Timestamp:
06/27/2026 09:53:29 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
907a013
Parents:
abdcf33
Message:

chore(branding): stale product names in comments + deploy templates -> Klonkt

Cosmetic only — comments (CSS/EJS/SQL/ecosystem.config.cjs headers) and the deploy/ doc
templates: old names (PrutCMS/PrutFolio) -> Klonkt, stale Prutter (removed DM feature) mentions
dropped, deploy/ Dutch comments translated to English. No code, identifiers, rendered strings,
package name, PWA id, real infra paths, or roboburr refs touched.

Location:
deploy
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • deploy/DEPLOY.md

    rabdcf33 rd2b7247  
    152152
    153153Now visit `https://YOUR-DOMAIN/`. You should see your site over HTTPS, with
    154 HSTS active and Prutter WebSocket working (browser dev-tools → Network →
    155 filter "WS" → see the `wss://YOUR-DOMAIN/ws/prutter` connection).
     154HSTS active.
    156155
    157156---
  • deploy/backup.sh

    rabdcf33 rd2b7247  
    11#!/usr/bin/env bash
    22#
    3 # PrutCMS v10 — nightly backup script.
     3# Klonkt — nightly backup script.
    44#
    55# Snapshots:
     
    1313#
    1414# Recommended cron:
    15 #   0 3 * * * /home/robin/prutcms/deploy/backup.sh >> /home/robin/prutcms/logs/backup.log 2>&1
     15#   0 3 * * * /home/robin/klonkt/deploy/backup.sh >> /home/robin/klonkt/logs/backup.log 2>&1
    1616
    1717set -euo pipefail
    1818
    1919# ── Config ────────────────────────────────────────────────────────
    20 APP_DIR="${APP_DIR:-/home/robin/prutcms}"
    21 BACKUP_DIR="${BACKUP_DIR:-/home/robin/backups/prutcms}"
     20APP_DIR="${APP_DIR:-/home/robin/klonkt}"
     21BACKUP_DIR="${BACKUP_DIR:-/home/robin/backups/klonkt}"
    2222KEEP_DAYS="${KEEP_DAYS:-14}"
    2323TS="$(date +%Y%m%d-%H%M%S)"
     
    3535
    3636# ── Tar the snapshot + storage subdirs ────────────────────────────
    37 ARCHIVE="$BACKUP_DIR/prutcms-$TS.tar.gz"
     37ARCHIVE="$BACKUP_DIR/klonkt-$TS.tar.gz"
    3838tar -czf "$ARCHIVE" \
    3939    -C "$BACKUP_DIR" "$(basename "$DB_SNAPSHOT")" \
     
    4747
    4848# ── Rotation ───────────────────────────────────────────────────────
    49 find "$BACKUP_DIR" -type f -name 'prutcms-*.tar.gz' -mtime "+$KEEP_DAYS" -delete
     49find "$BACKUP_DIR" -type f -name 'klonkt-*.tar.gz' -mtime "+$KEEP_DAYS" -delete
    5050
    5151SIZE="$(du -h "$ARCHIVE" | cut -f1)"
  • deploy/nginx.conf.example

    rabdcf33 rd2b7247  
    11# ──────────────────────────────────────────────────────────────────
    2 # PrutCMS v10 — nginx reverse proxy
     2# Klonkt — nginx reverse proxy
    33#
    4 # Place this in /etc/nginx/sites-available/prutcms and symlink to
     4# Place this in /etc/nginx/sites-available/klonkt and symlink to
    55# /etc/nginx/sites-enabled/. Replace <YOUR-DOMAIN> with the real host.
    66#
    77# Key points:
    88#   • SSL termination here; Node listens on 127.0.0.1:3000 only.
    9 #   • WebSocket upgrade headers wired through (Prutter live messaging).
     9#   • WebSocket upgrade headers wired through (in case any route uses WS).
    1010#   • Static assets cached aggressively (Node gives them 1y maxAge anyway).
    1111#   • Audio streaming endpoint /audio/stream/* must NOT be cached by nginx —
     
    1414#
    1515# After installing:
    16 #   sudo ln -s /etc/nginx/sites-available/prutcms /etc/nginx/sites-enabled/
     16#   sudo ln -s /etc/nginx/sites-available/klonkt /etc/nginx/sites-enabled/
    1717#   sudo nginx -t
    1818#   sudo systemctl reload nginx
     
    9696    }
    9797
    98     # ── WebSocket: Prutter live chat. Long-lived connection.
     98    # ── WebSocket: long-lived connection (in case any route uses WS).
    9999    location /ws/ {
    100100        proxy_pass http://127.0.0.1:3000;
  • deploy/post-receive

    rabdcf33 rd2b7247  
    11#!/bin/bash
    2 # PrutFolio deploy-hook — werkt zoals logboek-hook.
    3 # Bare repo is single source of truth.
    4 # /srv/prutfolio is de working tree — gevuld via "git --work-tree=..."
    5 # (geen .git submap erin), zelfde patroon als logboek->celine.
     2# Klonkt deploy hook — works like the logboek hook.
     3# The bare repo is the single source of truth.
     4# /srv/prutfolio is the working tree — populated via "git --work-tree=..."
     5# (no .git subdir inside), same pattern as logboek->celine.
    66set -e
    77
     
    1414    echo ">>> Deploying $newrev to $DEPLOY"
    1515
    16     # 1. Heel zelden — als een eerdere bug git-internals los in $DEPLOY
    17     #    heeft gedumpt (HEAD/objects/refs op root), eenmalig opruimen
    18     #    zodat dit een echte working tree wordt.
     16    # 1. Very rarely — if an earlier bug dumped git internals loose into
     17    #    $DEPLOY (HEAD/objects/refs at the root), clean them up once so this
     18    #    becomes a real working tree.
    1919    if [ -f "$DEPLOY/HEAD" ] && [ -d "$DEPLOY/objects" ] && [ ! -d "$DEPLOY/.git" ]; then
    2020        echo "    cleanup: stale bare-init artifacts in $DEPLOY"
     
    2424    fi
    2525
    26     # 2. Force-checkout van bare-repo state naar working tree.
     26    # 2. Force-checkout the bare-repo state into the working tree.
    2727    git --git-dir="$GIT_DIR" --work-tree="$DEPLOY" checkout -f main
    2828
    29     # 3. npm install alleen als package-lock.json wijzigde.
     29    # 3. npm install only when package-lock.json changed.
    3030    if [ -n "$oldrev" ] && [ "$oldrev" != "0000000000000000000000000000000000000000" ]; then
    3131        if git --git-dir="$GIT_DIR" diff --name-only "$oldrev" "$newrev" | grep -q "^package-lock.json$"; then
     
    3838    pm2 reload klonkt 2>/dev/null || true
    3939
    40     echo ">>> Done. App-files in $DEPLOY ongemoeid (.env, node_modules, storage)."
     40    echo ">>> Done. App files in $DEPLOY left untouched (.env, node_modules, storage)."
    4141done
Note: See TracChangeset for help on using the changeset viewer.