Files
sendico/ci/pipelines/fx/deploy.sh
Stephan D 0e40af7559
Some checks failed
ci/woodpecker/push/fx/1 Pipeline failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx/2 Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
build fix
2025-11-07 22:58:59 +01:00

31 lines
908 B
Bash
Executable File

#!/bin/sh
set -eu
if ! set -o pipefail 2>/dev/null; then
:
fi
sh ci/pipelines/fx/ensure_env_version.sh
sed -i 's/\r$//' ./ci/prod/.env.runtime
set -a
. ./ci/prod/.env.runtime
. ./.env.version
set +a
FX_MONGO_SECRET_PATH="${FX_MONGO_SECRET_PATH:?missing FX_MONGO_SECRET_PATH}"
FX_DEPLOY_TARGET="${FX_DEPLOY_TARGET:?missing FX_DEPLOY_TARGET}"
FX_NEEDS_NATS="${FX_NEEDS_NATS:-false}"
export FX_MONGO_USER="$(./ci/vlt kv_get kv "${FX_MONGO_SECRET_PATH}" user)"
export FX_MONGO_PASSWORD="$(./ci/vlt kv_get kv "${FX_MONGO_SECRET_PATH}" password)"
if [ "${FX_NEEDS_NATS}" = "true" ]; then
export NATS_USER="$(./ci/vlt kv_get kv sendico/nats user)"
export NATS_PASSWORD="$(./ci/vlt kv_get kv sendico/nats password)"
export FX_NATS_URL="nats://${NATS_USER}:${NATS_PASSWORD}@${NATS_HOST}:${NATS_PORT}"
fi
bash ci/prod/scripts/bootstrap/network.sh
bash ci/prod/scripts/deploy/fx.sh "${FX_DEPLOY_TARGET}"