2026-06-14 01:39:43 +02:00
|
|
|
#!/usr/bin/env bash
|
2026-06-14 23:20:02 +02:00
|
|
|
# Roll out the latest main branch to the public VPS instance.
|
2026-06-14 01:39:43 +02:00
|
|
|
#
|
2026-06-14 23:20:02 +02:00
|
|
|
# Layout on the host:
|
chore: rebrand Subfeed -> Siftlode
Rename all user-facing references (UI wordmark Sift+lode, titles, app name,
legal pages, onboarding wizard, emails, README/docs) and infra paths
(/srv/subfeed -> /srv/siftlode, image tag, deploy script, backup filenames).
Internal identifiers kept on purpose: Postgres user/db "subfeed", logger
namespace, localStorage keys, and the subfeed_pgdata volume (renaming would
orphan the migrated production data).
2026-06-14 04:40:22 +02:00
|
|
|
# /srv/siftlode/src git clone of this repo (build context + compose file)
|
|
|
|
|
# /srv/siftlode/.env secrets, mode 0600 (never in git)
|
2026-06-14 01:39:43 +02:00
|
|
|
#
|
|
|
|
|
# Build runs on the host Docker daemon, so it isn't constrained by the CI runner's memory.
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
chore: rebrand Subfeed -> Siftlode
Rename all user-facing references (UI wordmark Sift+lode, titles, app name,
legal pages, onboarding wizard, emails, README/docs) and infra paths
(/srv/subfeed -> /srv/siftlode, image tag, deploy script, backup filenames).
Internal identifiers kept on purpose: Postgres user/db "subfeed", logger
namespace, localStorage keys, and the subfeed_pgdata volume (renaming would
orphan the migrated production data).
2026-06-14 04:40:22 +02:00
|
|
|
ROOT=/srv/siftlode
|
2026-06-14 01:39:43 +02:00
|
|
|
cd "$ROOT/src"
|
|
|
|
|
|
|
|
|
|
git fetch --quiet origin
|
|
|
|
|
git checkout --quiet main
|
|
|
|
|
git pull --ff-only --quiet
|
|
|
|
|
|
2026-06-15 00:06:57 +02:00
|
|
|
# Stamp the image with the version/commit being built (read by /api/version + the SPA).
|
|
|
|
|
export APP_VERSION="$(cat VERSION 2>/dev/null || echo dev)"
|
|
|
|
|
export GIT_SHA="$(git rev-parse --short HEAD)"
|
|
|
|
|
export BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
|
|
|
|
2026-06-14 01:39:43 +02:00
|
|
|
docker compose -f docker-compose.prod.yml --env-file "$ROOT/.env" up -d --build
|
|
|
|
|
docker image prune -f >/dev/null || true
|
|
|
|
|
docker compose -f docker-compose.prod.yml --env-file "$ROOT/.env" ps
|