Add explicit Forgejo deployment structure with artifact build pipeline
- Introduce clear directory separation for docker, infra, ci, and config - Add CloudFormation pipeline for S3 → CodeBuild → ECR - Implement explicit artifact build script for flat deployment zip - Provide example runtime configuration and ignore secrets
This commit is contained in:
commit
46ec47aa2d
8 changed files with 323 additions and 0 deletions
23
scripts/build-artifact.sh
Executable file
23
scripts/build-artifact.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
ARTIFACT_DIR="${ROOT_DIR}/artifacts"
|
||||
ZIP_PATH="${ARTIFACT_DIR}/forgejo-source.zip"
|
||||
|
||||
mkdir -p "${ARTIFACT_DIR}"
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -rf "${tmpdir}"' EXIT
|
||||
|
||||
cp "${ROOT_DIR}/docker/Dockerfile" "${tmpdir}/Dockerfile"
|
||||
cp "${ROOT_DIR}/docker/entrypoint.sh" "${tmpdir}/entrypoint.sh"
|
||||
cp "${ROOT_DIR}/config/app.ini" "${tmpdir}/app.ini"
|
||||
cp "${ROOT_DIR}/ci/buildspec.yml" "${tmpdir}/buildspec.yml"
|
||||
|
||||
(
|
||||
cd "${tmpdir}"
|
||||
zip -r "${ZIP_PATH}" .
|
||||
)
|
||||
|
||||
echo "Artifact created: ${ZIP_PATH}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue