mirror of
https://github.com/Sea-Haven-Industries/forgejo.git
synced 2026-09-30 20:03:13 +00:00
* feat(terraform): migrate forgejo to HCP Terraform Move the prod host onto workspace forgejo-prod in the After Hours VPC and freeze CDK push deploys so cutover can happen without applying into seahaven-prod. * fix(terraform): restore forgejo.db from the dump tarball Boot restore was copying data/ and repos/ and leaving the sqlite file at the archive root, so a volume restore started Forgejo with no database.
25 lines
754 B
Bash
25 lines
754 B
Bash
#!/usr/bin/env bash
|
|
# Bundle the backup-verification function for the arm64 Lambda runtime.
|
|
# Runs on the Terraform worker during plan. HCP plan and apply use different
|
|
# workers, so the zip bytes are carried in the plan (see lambda.tf).
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
|
REPO="$(cd "${ROOT}/.." && pwd)"
|
|
SRC="${REPO}/lambda/backup-verification"
|
|
BUILD="${ROOT}/build/function"
|
|
|
|
rm -rf "${BUILD}"
|
|
mkdir -p "${BUILD}"
|
|
|
|
python3 -m pip install \
|
|
--target "${BUILD}" \
|
|
--platform manylinux2014_aarch64 \
|
|
--implementation cp \
|
|
--python-version 3.12 \
|
|
--only-binary=:all: \
|
|
--upgrade \
|
|
--requirement "${SRC}/requirements.txt"
|
|
|
|
cp "${SRC}/app.py" "${BUILD}/app.py"
|
|
find "${BUILD}" -type d -name __pycache__ -exec rm -rf {} +
|