fix(devops): harden single-vm gitea bootstrap
This commit is contained in:
parent
388d71a06f
commit
b261c5d13f
@ -396,7 +396,7 @@ phase2_gitea() {
|
|||||||
|
|
||||||
# ── Create admin user (idempotent) ─────────────────────────────────
|
# ── Create admin user (idempotent) ─────────────────────────────────
|
||||||
log "Creating Gitea admin user..."
|
log "Creating Gitea admin user..."
|
||||||
docker exec "$GITEA_CONTAINER" gitea admin user create \
|
docker exec --user git "$GITEA_CONTAINER" gitea admin user create \
|
||||||
--username "$GITEA_ADMIN" \
|
--username "$GITEA_ADMIN" \
|
||||||
--password "$GITEA_PASS" \
|
--password "$GITEA_PASS" \
|
||||||
--email "admin@bytelyst.local" \
|
--email "admin@bytelyst.local" \
|
||||||
@ -409,7 +409,7 @@ phase2_gitea() {
|
|||||||
|
|
||||||
# Check if org exists
|
# Check if org exists
|
||||||
local org_status
|
local org_status
|
||||||
org_status=$(curl -sf -o /dev/null -w "%{http_code}" \
|
org_status=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
-H "$AUTH_HEADER" "${GITEA_URL}/api/v1/orgs/bytelyst")
|
-H "$AUTH_HEADER" "${GITEA_URL}/api/v1/orgs/bytelyst")
|
||||||
|
|
||||||
if [ "$org_status" != "200" ]; then
|
if [ "$org_status" != "200" ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user