mirror of
https://github.com/storytold/figcraft.git
synced 2026-12-04 19:41:51 -05:00
2dadb3fd33
On a container platform the settings file is part of the image, so giving a server its public address or its proxy meant building an image of its own. Each key of the settings file can now also come from FIGCRAFT_SERVER_ and the key in capitals (public_url is FIGCRAFT_SERVER_PUBLIC_URL, max_file_mb is FIGCRAFT_SERVER_MAX_FILE_MB). The variables override the file and flags override them; an empty variable counts as unset, and a value that doesn't fit its key stops the server with an error naming the variable. The prefix is FIGCRAFT_SERVER_ rather than FIGCRAFT_, as with FIGCRAFT_CONTROL_*, so the server's settings never meet the app's own variables. The list of keys names every field of the settings, so a new key that isn't given its variable doesn't compile. Part of #2044.