mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-16 14:30:51 -05:00
[GH-ISSUE #2812] To much site creations with provisioning keys #7043
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daddeldash on GitHub (Apr 8, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/2812
Describe the Bug
When I use the new provisioning keys (which are an amazing idea!), and start my newt container, the site is created as expected. But when I restart the container (or it gets an error and is restarting constantly), Pangoling creates a new site for every single boot.
Environment
To Reproduce
Like described above
Expected Behavior
I expected pangolin to reuse the preconfigured site
@LaurenceJJones commented on GitHub (Apr 8, 2026):
Provisioning keys are meant to be used in ephemeral environments, but also you should specify environment
CONFIG_FILE=/var/newt.jsonto make sure the configuration gets written to where you have persisted the volume mount so next time it should just use it unless we didnt account for it.edit: checked the code it does skip provisioning if the file is persisted, so it not a bug just a configuration issue inside your compose EG: add that environment and ensure the volume mount is a file and persisted correctly.
Just note you may get a error if that file didnt exist before and its now a directory (docker defaults to creating a directory if file doesnt exist), so
rm volumes/newt/newt.json && touch volumes/newt/newt.json@daddeldash commented on GitHub (Apr 8, 2026):
That's right, but when even if I start multiple instances of the same container, multiple sites are created in pangolin (and will never be deleted), all with the exact same name
@LaurenceJJones commented on GitHub (Apr 8, 2026):
Okay but again, make sure you have the environment flag to define where the configuration file sits and that
./volumes/newt/newt.jsonis a file and not a directory so that newt can write to the location.As long as those things are in order, if you check the logs it will print what newt is doing.
edit: so there a few issues let me check with maintainer if the aim is to have this working.
So it fails fast without proper json so
then (just used podman but same for compose)
then file is created and persisted
then its reused
@daddeldash commented on GitHub (Apr 8, 2026):
Ok, I've set the CONFIG_FILE env, but my problem was that docker created a directory instead of a file for
./volumes/newt/newt.json. Thanks you!But now, I'm running in the next problem. When I create an empty
newt.jsonfile by hand, the docker container restarts continuously. Maybe docker and podman are working different in this case?@LaurenceJJones commented on GitHub (Apr 8, 2026):
Yeah I ran into that also just scaffold with empty json
im going to throw a PR in newt direction to check if 0 bytes and skip the json as its an empty file
realistically you should mount a directory instead like
./volumes/newt/:/var/this would be easier if you plan to use this compose across multiple sites as then you dont have a pre scaffold script to ensure the file exists and docker wont bite you in the ass and create a directory 😆Plus newt wont complain about json if the file doesnt exist on disk yet, it will skip the json part leading to better consistent results.
@daddeldash commented on GitHub (Apr 8, 2026):
Thank's a lot, man. With the '{}' trick it worked 🤗
Now I have to figure out how I can persist this workaround for my hosts, since the deployment software only delivers docker-compose.yml and .env 🙈
@LaurenceJJones commented on GitHub (Apr 8, 2026):
Yeah my recommendation is:
CONFIG_FILEis set relative to the persisted mount..jsonfile mount just the base directory EG:./volumes/newt/:/var/.This should fix all issues as:
@daddeldash commented on GitHub (Apr 8, 2026):
Oh wow, that was really too simple. I really wonder why I was stuck to a file-bind mount in my head instead of just mounting the folder.
Again, thank's a lot for your guidance