deploy forum: nævn manglende secrets, før noget ændres på serveren
Some checks are pending
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
CI / Build og unit tests (push) Successful in 54s
CI / MSI-installer (push) Successful in 34s
Some checks are pending
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
CI / Build og unit tests (push) Successful in 54s
CI / MSI-installer (push) Successful in 34s
Workflowet stoppede med "FORUM_PORT is not set", fordi forummets secrets ikke er oprettet endnu. Nu tjekkes alle påkrævede secrets først og listes samlet, og install.sh validerer værdierne, før discourse_docker klones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3EExwndy8Z22EK2Qpt6BK
This commit is contained in:
parent
69fa641f26
commit
85d3674d53
2 changed files with 15 additions and 2 deletions
|
|
@ -46,6 +46,14 @@ jobs:
|
|||
FORUM_DB_SHARED_BUFFERS: ${{ secrets.FORUM_DB_SHARED_BUFFERS }}
|
||||
run: |
|
||||
set -eu
|
||||
missing=""
|
||||
for v in FORUM_BIND FORUM_PORT KNOWN_PROXY FORUM_ADMIN_EMAIL FORUM_SMTP_ADDRESS FORUM_SMTP_USER FORUM_SMTP_PASSWORD; do
|
||||
[ -n "$(printenv "$v" || true)" ] || missing="$missing $v"
|
||||
done
|
||||
if [ -n "$missing" ]; then
|
||||
echo "ERROR: disse secrets mangler i repo-indstillingerne:$missing (FORUM_BIND er secret HOST_BIND). Se docs/community.md."
|
||||
exit 1
|
||||
fi
|
||||
# Samme sti inde og ude, så launcherens bind mounts (/var/discourse/shared/...) peger på værtens mapper.
|
||||
docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ fi
|
|||
|
||||
command -v docker >/dev/null || { echo "Docker mangler." >&2; exit 1; }
|
||||
|
||||
# Check the values before touching anything on the server.
|
||||
rendered="$(mktemp)"
|
||||
trap 'rm -f "$rendered"' EXIT
|
||||
python3 "$HERE/render.py" "$HERE/app.yml" "$rendered"
|
||||
|
||||
if [[ ! -d $TARGET/.git ]]; then
|
||||
git clone --depth 1 https://github.com/discourse/discourse_docker.git "$TARGET"
|
||||
else
|
||||
|
|
@ -24,10 +29,10 @@ else
|
|||
fi
|
||||
|
||||
mkdir -p "$TARGET/containers"
|
||||
python3 "$HERE/render.py" "$HERE/app.yml" "$TARGET/containers/app.yml"
|
||||
install -m 600 "$rendered" "$TARGET/containers/app.yml"
|
||||
|
||||
cd "$TARGET"
|
||||
# The launcher asks before continuing on low memory; answer yes when running unattended.
|
||||
# Skip the interactive prerequisite checks (they cannot be answered from a workflow).
|
||||
./launcher rebuild app --skip-prereqs
|
||||
|
||||
host="${FORUM_HOSTNAME:-forum.sqlinsight.seosoft.dk}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue