Files
hla_framework_bd/.gitea/scripts/deploy-for-services.sh

21 lines
469 B
Bash
Executable File

#!/bin/bash
# Deploys and restarts a single service or all services.
#
# Usage: ./.gitea/scripts/deploy-for-services.sh <service-name|all> <dev|prod>
set -euo pipefail
SERVICE=${1:-}
AGEBD_ENV=${2:-}
SCRIPT_DIR=$(dirname "$0")
if [ "${SERVICE}" = "all" ]; then
SERVICES=$(ls -d services/*/ | xargs -n1 basename)
else
SERVICES=${SERVICE}
fi
for SERVICE_NAME in ${SERVICES}; do
"${SCRIPT_DIR}/deploy-service.sh" "${SERVICE_NAME}" "${AGEBD_ENV}" true
done