update nginx

This commit is contained in:
2026-08-26 17:33:22 -05:00
parent 4b34d5f9a7
commit 9186158313
12 changed files with 94 additions and 6 deletions
+32
View File
@@ -82,6 +82,16 @@ for template in \
}
done
done
grep -F -- './config/nginx/bootstrap.conf.template:/etc/nginx/templates/default.conf.template:ro' \
"${TEST_ROOT}/compose.yaml" >/dev/null || {
printf 'FAIL: Nginx bootstrap template is not deployment-local\n' >&2
exit 1
}
grep -F -- './config/nginx/sites:/etc/nginx/sites:ro' \
"${TEST_ROOT}/compose.yaml" >/dev/null || {
printf 'FAIL: Nginx site snippets are not mounted from configuration\n' >&2
exit 1
}
printf '%s\n' \
'broker.test' \
@@ -105,6 +115,21 @@ assert_env 'TAPM_GITEA_URL=http://git.test:8780'
assert_env 'TAPM_GITEA_INTERNAL_URL=http://gitea:3000'
assert_env 'GITEA_PUBLIC_URL=http://git.test:8780/'
assert_env 'TAPM_DEFAULT_DURATION=7d'
for template_name in bootstrap http tls; do
cmp "${TEST_ROOT}/deploy/nginx/templates/${template_name}.conf.template" \
"${deployment}/config/nginx/${template_name}.conf.template" || {
printf 'FAIL: Nginx %s template was not seeded into config/nginx\n' "$template_name" >&2
exit 1
}
done
printf '%s\n' '# local Nginx customization' \
>"${deployment}/config/nginx/http.conf.template"
"${deployment}/manage.sh" prepare >/dev/null
grep -Fx '# local Nginx customization' \
"${deployment}/config/nginx/http.conf.template" >/dev/null || {
printf 'FAIL: Nginx configuration was overwritten during prepare\n' >&2
exit 1
}
grep -F -- '-f compose.yaml -f compose.http.yaml up -d gitea nginx' \
"$MOCK_DOCKER_LOG" >/dev/null || {
printf 'FAIL: HTTP bootstrap did not select compose.http.yaml\n' >&2
@@ -135,6 +160,13 @@ assert_env 'GITEA_PUBLIC_URL=https://git.test/'
assert_env 'SSL_MODE=none'
assert_env 'TAPM_PUBLIC_URL=http://broker.test:8780'
"${deployment}/manage.sh" reload-nginx >/dev/null
grep -F -- '-f compose.yaml -f compose.http.yaml up -d --force-recreate nginx' \
"$MOCK_DOCKER_LOG" >/dev/null || {
printf 'FAIL: Nginx reload did not use the active HTTP stack\n' >&2
exit 1
}
"${deployment}/manage.sh" rotate-cookie-secret >/dev/null
rotated_secret="$(
sed -n 's/^TAPM_COOKIE_SECRET=//p' "${deployment}/.env"