Merge pull request 'Initial dev deployment [infra]' (#745) from dev-742 into main
Some checks failed
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_methods Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/payments_quotation Pipeline is pending
ci/woodpecker/push/callbacks Pipeline is pending
ci/woodpecker/push/db Pipeline is pending
ci/woodpecker/push/discovery Pipeline is pending
ci/woodpecker/push/frontend Pipeline is pending
ci/woodpecker/push/fx_ingestor Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_mntx Pipeline is pending
ci/woodpecker/push/gateway_tgsettle Pipeline is pending
ci/woodpecker/push/bff Pipeline failed
ci/woodpecker/push/billing_fees Pipeline failed
ci/woodpecker/push/billing_documents Pipeline failed

Reviewed-on: #745 [infra]
This commit was merged in pull request #745.
This commit is contained in:
2026-03-16 13:05:11 +00:00
22 changed files with 62 additions and 96 deletions

View File

@@ -78,11 +78,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -73,11 +73,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -73,11 +73,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -74,11 +74,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -27,12 +27,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
# Retrieve SSH private key for deploy (existing helper)
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- name: deploy - name: deploy
image: alpine:latest image: alpine:latest

View File

@@ -72,11 +72,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -46,11 +46,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -78,11 +78,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -79,11 +79,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -77,11 +77,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -76,11 +76,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -74,11 +74,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -77,11 +77,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -73,11 +73,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -27,11 +27,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- name: deploy - name: deploy
image: alpine:latest image: alpine:latest

View File

@@ -76,11 +76,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -74,11 +74,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -74,11 +74,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -74,11 +74,7 @@ steps:
commands: commands:
- set -euo pipefail - set -euo pipefail
- apk add --no-cache bash coreutils openssh-keygen curl sed python3 - apk add --no-cache bash coreutils openssh-keygen curl sed python3
- mkdir -p secrets - sh ci/scripts/common/fetch_deploy_ssh_key.sh secrets/SSH_KEY
- ./ci/vlt kv_to_file kv ops/deploy/ssh_key private_b64 secrets/SSH_KEY.b64 600
- base64 -d secrets/SSH_KEY.b64 > secrets/SSH_KEY
- chmod 600 secrets/SSH_KEY
- ssh-keygen -y -f secrets/SSH_KEY >/dev/null
- ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER - ./ci/vlt kv_get kv registry user > secrets/REGISTRY_USER
- ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD - ./ci/vlt kv_get kv registry password > secrets/REGISTRY_PASSWORD

View File

@@ -7,3 +7,4 @@ WS_PROTOCOL=ws
SSH_HOST=178.57.67.136 SSH_HOST=178.57.67.136
SSH_USER=cloud SSH_USER=cloud
DEPLOY_SSH_KEY_PATH=ops/deploy/dev_ssh_key

View File

@@ -35,6 +35,7 @@ PBM_S3_BUCKET=backup
SSH_HOST=178.57.67.248 SSH_HOST=178.57.67.248
SSH_USER=cloud SSH_USER=cloud
DEPLOY_SSH_KEY_PATH=ops/deploy/ssh_key
REMOTE_BASE=/srv/sendico REMOTE_BASE=/srv/sendico
DB_DIR=db DB_DIR=db
DB_COMPOSE_PROJECT=sendico-db DB_COMPOSE_PROJECT=sendico-db

View File

@@ -0,0 +1,41 @@
#!/bin/sh
set -eu
REPO_ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
cd "${REPO_ROOT}"
DEST_FILE="${1:-secrets/SSH_KEY}"
DEST_DIR="$(dirname "${DEST_FILE}")"
ENCODED_FILE="${DEST_FILE}.b64"
. ci/scripts/common/runtime_env.sh
env_name="${CI_TARGET_ENV:-$(resolve_runtime_env_name)}"
runtime_file="$(resolve_runtime_env_file "${env_name}")"
cleanup_runtime_file=0
case "${runtime_file}" in
./.runtime.*.merged.*)
cleanup_runtime_file=1
;;
esac
cleanup() {
rm -f "${ENCODED_FILE}"
if [ "${cleanup_runtime_file}" -eq 1 ]; then
rm -f "${runtime_file}"
fi
}
trap cleanup EXIT INT TERM
normalize_env_file "${runtime_file}"
load_env_file "${runtime_file}"
DEPLOY_SSH_KEY_PATH="${DEPLOY_SSH_KEY_PATH:-ops/deploy/ssh_key}"
mkdir -p "${DEST_DIR}"
./ci/vlt kv_to_file kv "${DEPLOY_SSH_KEY_PATH}" private_b64 "${ENCODED_FILE}" 600
base64 -d "${ENCODED_FILE}" > "${DEST_FILE}"
chmod 600 "${DEST_FILE}"
ssh-keygen -y -f "${DEST_FILE}" >/dev/null
printf '[fetch-deploy-ssh-key] env=%s path=%s\n' "${env_name}" "${DEPLOY_SSH_KEY_PATH}" >&2