feat(deploy): fix deploy ports
Some checks failed
Build, Test and Deploy / test-backend (push) Successful in 1m12s
Build, Test and Deploy / build-and-push (push) Successful in 15s
Build, Test and Deploy / deploy (push) Failing after 3s

This commit is contained in:
2026-02-11 15:21:41 +01:00
parent dfc27da142
commit b249cf2000
4 changed files with 17 additions and 7 deletions

View File

@@ -132,9 +132,13 @@ jobs:
ssh-keyscan -H "${{ secrets.SERVER_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null
- name: Write DB env on server
- name: Write env to server
shell: bash
run: |
# 1. Start with the static env file content
cat "deploy/envs/${{ env.ENV }}.env" > /tmp/full_env.env
# 2. Determine DB credentials
if [[ "${{ env.ENV }}" == "prod" ]]; then
DB_URL="${{ secrets.DB_URL_PROD }}"
DB_USER="${{ secrets.DB_USERNAME_PROD }}"
@@ -149,11 +153,17 @@ jobs:
DB_PASS="${{ secrets.DB_PASSWORD_DEV }}"
fi
printf 'DB_URL=%s\nDB_USERNAME=%s\nDB_PASSWORD=%s\n' \
"$DB_URL" "$DB_USER" "$DB_PASS" > /tmp/pc.env
# 3. Append DB credentials
printf '\nDB_URL=%s\nDB_USERNAME=%s\nDB_PASSWORD=%s\n' \
"$DB_URL" "$DB_USER" "$DB_PASS" >> /tmp/full_env.env
# 4. Debug: print content (for debug purposes)
echo "Preparing to send env file with variables:"
grep -v "PASSWORD" /tmp/full_env.env || true
# 5. Send to server
ssh -i ~/.ssh/id_ed25519 -o BatchMode=yes "${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}" \
"setenv ${{ env.ENV }}" < /tmp/pc.env
"setenv ${{ env.ENV }}" < /tmp/full_env.env
- name: Trigger deploy on Unraid (forced command key)
shell: bash

View File

@@ -1,5 +1,5 @@
REGISTRY_URL=git.joekung.ch
REPO_OWNER=JoeKung
REPO_OWNER=joekung
ENV=dev
TAG=dev

View File

@@ -1,5 +1,5 @@
REGISTRY_URL=git.joekung.ch
REPO_OWNER=JoeKung
REPO_OWNER=joekung
ENV=int
TAG=int

View File

@@ -1,5 +1,5 @@
REGISTRY_URL=git.joekung.ch
REPO_OWNER=JoeKung
REPO_OWNER=joekung
ENV=prod
TAG=prod