Files
broccoli 52c2496331
Build, Push and Deploy / build (push) Failing after 1s
Build, Push and Deploy / deploy (push) Skipped
ci: add Gitea Actions build and deploy pipeline
2026-08-30 15:05:37 +08:00

23 lines
450 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
APP_NAME="${1:-wordcloud}"
TARGET_ENV="${2:-production}"
IMAGE_TAG="${3:-latest}"
cd "$(dirname "$0")"
if docker compose version >/dev/null 2>&1; then
COMPOSE="docker compose"
else
COMPOSE="docker-compose"
fi
export COMPOSE_PROJECT_NAME="${APP_NAME}"
export IMAGE_TAG
echo "[deploy] project=${APP_NAME} env=${TARGET_ENV} image_tag=${IMAGE_TAG}"
$COMPOSE pull
$COMPOSE up -d --remove-orphans
$COMPOSE ps