homepage/deploy.sh
Vadym Samoilenko be5e2a5e7c Deploy: add basePath support and server docker-compose
- next.config.js: basePath from NEXT_PUBLIC_BASE_PATH env var (build arg)
- docker-compose.yml: builds with /homepage base path, exposes :3001 locally, mounts config dir and Docker socket
- deploy.sh: clone/pull + build + start script for optical-dev server

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 12:27:45 +01:00

30 lines
596 B
Bash

#!/bin/bash
set -e
DEPLOY_DIR="/opt/homepage"
REPO="git@bitbucket.org:zlalani/homepage.git"
echo "=== Homepage Deploy ==="
if [ ! -d "$DEPLOY_DIR/.git" ]; then
echo "Cloning repository..."
git clone "$REPO" "$DEPLOY_DIR"
cd "$DEPLOY_DIR"
else
echo "Pulling latest changes..."
cd "$DEPLOY_DIR"
git pull origin dev
fi
mkdir -p config
echo "Building and starting container..."
docker compose build --no-cache
docker compose up -d
echo "Waiting for healthcheck..."
sleep 15
docker compose ps
echo ""
echo "Done. Homepage available at https://optical-dev.oliver.solutions/homepage"