owpengram-server/internal/procctl
Astra 4cbd4c0c9e
Some checks failed
CI / Go tests (push) Has been cancelled
CI / Admin web build (push) Has been cancelled
CI / Grammy store bot (push) Has been cancelled
CI / Docker main topology smoke (push) Has been cancelled
admin: fix env editor crash and ship .env.example into the image
ReadEnvGroups returned (nil, nil) when .env.example wasn't found, and that
nil slice marshaled to JSON null instead of []. The admin UI's env editor
unconditionally calls .reduce()/.map() on the response, so it crashed on
load with "Cannot read properties of null" -- and .env.example was never
copied into the container image in the first place, so this was always the
production code path, not an edge case.

Fixed the nil-slice response and added .env.example to the image so the
editor actually has a template of available settings to show. The real
current values still require the deploy host to mount its actual .env file
into the owpengram-admin container at /app/.env (procctl.Manager.Root is
just os.Getwd(), i.e. the container's /app workdir) -- that's a systemd
Quadlet unit change on the deploy host, not something this commit can fix on
its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 17:02:02 +01:00
..
admin_restart_test.go fixes and improvements for new server settings menu 2026-08-26 00:37:25 +03:00
env_sensitive_test.go fixes for storage managament 2026-09-03 08:33:06 +03:00
env_test.go adding more functions to media managament system 2026-09-03 00:54:09 +03:00
hidewindow_other.go improved settings window 2026-08-26 02:44:59 +03:00
hidewindow_windows.go improved settings window 2026-08-26 02:44:59 +03:00
procctl.go admin: fix env editor crash and ship .env.example into the image 2026-09-14 17:02:02 +01:00