13 Commits

Author SHA1 Message Date
qzl 0c6c4cfa82 Merge pull request #11 from dev
Build production Docker image / build-backend-image (push) Failing after 2m33s
Build production Docker image / deploy-production (push) Has been skipped
ci: clone production workflow over ssh
2026-05-21 16:42:51 +08:00
qzl e17afac339 Merge pull request #10 from dev
Build production Docker image / deploy-production (push) Has been cancelled
Build production Docker image / build-backend-image (push) Has been cancelled
feat: add invite rewards and redeem codes
2026-05-21 16:27:38 +08:00
qzl 9cdfee1596 Merge pull request 'fix: update CREEM product IDs for production' (#9) from dev into main
Build production Docker image / build-backend-image (push) Successful in 1m11s
Build production Docker image / deploy-production (push) Failing after 8s
2026-05-11 19:40:01 +08:00
qzl 13b8e047c2 Merge pull request 'Merge dev into main: CREEM payment, performance optimization, deploy updates' (#8) from dev into main
Build production Docker image / build-backend-image (push) Successful in 2m10s
Build production Docker image / deploy-production (push) Successful in 40s
2026-05-11 19:16:17 +08:00
qzl f2c3c795e7 Merge dev into main
Build production Docker image / build-backend-image (push) Successful in 52s
Build production Docker image / deploy-production (push) Successful in 41s
Security hardening: disable Swagger in prod, remove dead debug field
2026-04-30 11:48:04 +08:00
qzl 46394ffcdf Merge dev into main
Build production Docker image / build-backend-image (push) Successful in 48s
Build production Docker image / deploy-production (push) Successful in 44s
Fix .env quoting for safe shell sourcing
2026-04-30 11:29:22 +08:00
qzl 786acfe010 Merge dev into main: fix deployment secret handling
Build production Docker image / build-backend-image (push) Successful in 53s
Build production Docker image / deploy-production (push) Failing after 6s
Avoid logging multiline deploy secrets and document ECR cleanup permissions.
2026-04-30 11:20:21 +08:00
qzl 2657a7a339 Merge dev into main: fix workflow checkout
Build production Docker image / build-backend-image (push) Failing after 51s
Build production Docker image / deploy-production (push) Has been skipped
Use self-hosted Gitea clone instead of external checkout action.
2026-04-30 11:17:15 +08:00
qzl 7a84bb5d16 Merge dev into main: production deployment automation
Build production Docker image / build-backend-image (push) Waiting to run
Build production Docker image / deploy-production (push) Has been cancelled
Enable production rollout through Gitea Actions and include latest app configuration updates.
2026-04-30 11:08:37 +08:00
qzl 5da1cba851 Merge dev into main: include uv lock
Build production Docker image / build-backend-image (push) Failing after 35s
Track uv.lock so the production Docker workflow can build from a clean checkout.
2026-04-29 18:22:53 +08:00
qzl a2ce6d8502 Merge dev into main: backend ECR deployment flow
Build production Docker image / build-backend-image (push) Failing after 3m11s
Add backend Docker build workflow, ECR push, and EC2 Docker Compose deployment docs.
2026-04-29 18:07:10 +08:00
qzl fd4fae318d Merge dev into main: cloud supabase migration ready for production 2026-04-27 09:57:54 +08:00
qzl 1acd4be28e Initial commit 2026-04-14 21:40:34 +08:00
2 changed files with 11 additions and 30 deletions
+8 -30
View File
@@ -12,16 +12,11 @@ jobs:
env:
IMAGE_NAME: eryao-backend
IMAGE_SIZE_LIMIT_BYTES: 500000000
RUNNER_REPO_CACHE: /home/zl/Code/eryao
steps:
- name: Check out repository
run: |
set -euo pipefail
git -C "${RUNNER_REPO_CACHE}" fetch --no-tags origin "${GITHUB_SHA}"
git init .
git remote add origin "${RUNNER_REPO_CACHE}/.git"
git fetch --no-tags --depth=1 origin "${GITHUB_SHA}"
git checkout --detach FETCH_HEAD
git clone --depth 1 --branch "${GITHUB_REF_NAME:-main}" "ssh://git@www.qzselfz.cloud:2222/${GITHUB_REPOSITORY}.git" .
- name: Validate ECR configuration
run: |
@@ -73,8 +68,6 @@ jobs:
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
run: |
set -euo pipefail
export HTTP_PROXY= HTTPS_PROXY= ALL_PROXY= http_proxy= https_proxy= all_proxy=
caller_account_id="$(aws sts get-caller-identity --query Account --output text)"
if [ "${caller_account_id}" != "${AWS_ACCOUNT_ID}" ]; then
echo "AWS_ACCOUNT_ID does not match caller identity" >&2
@@ -93,41 +86,26 @@ jobs:
--image-scanning-configuration scanOnPush=true \
--encryption-configuration encryptionType=AES256 >/dev/null
retry() {
for attempt in 1 2 3; do
if "$@"; then
return 0
fi
if [ "${attempt}" -eq 3 ]; then
return 1
fi
sleep "$((attempt * 5))"
done
}
aws ecr get-login-password --region "${AWS_REGION}" \
| docker login --username AWS --password-stdin "${ecr_registry}"
ecr_login() {
aws ecr get-login-password --region "${AWS_REGION}" \
| docker login --username AWS --password-stdin "${ecr_registry}"
}
retry ecr_login
docker tag "${IMAGE_NAME}:prod-${GITHUB_SHA}" "${ecr_image}:latest"
retry docker push "${ecr_image}:latest"
untagged_image_ids="$(aws ecr list-images \
image_ids="$(aws ecr list-images \
--region "${AWS_REGION}" \
--repository-name "${ECR_REPOSITORY}" \
--filter tagStatus=UNTAGGED \
--query 'imageIds[*]' \
--output json)"
if [ "${untagged_image_ids}" != "[]" ]; then
if [ "${image_ids}" != "[]" ]; then
aws ecr batch-delete-image \
--region "${AWS_REGION}" \
--repository-name "${ECR_REPOSITORY}" \
--image-ids "${untagged_image_ids}" >/dev/null \
--image-ids "${image_ids}" >/dev/null \
|| echo "Warning: ECR image cleanup failed; ensure the CI AWS user has ecr:BatchDeleteImage" >&2
fi
docker push "${ecr_image}:latest"
deploy-production:
needs: build-backend-image
runs-on: wsl2-docker-host
+3
View File
@@ -0,0 +1,3 @@
# eryao
eryao test repo