Replies: 2 comments 6 replies
-
Please note that this response was created using generative AI, leveraging previously available information from the repository. This information may be helpful. However, it is our strong recommendation that you carefully consider the information before blindly applying it. This response is generated only once - you will not be able to interact with the glime-ai. You are correct that the most important part is to ensure the container is recreated when it starts. This is to avoid configuration mishaps and ensure that the setup scripts run correctly. Here are some key points to address your concerns:
Here is an example of how you might implement such a check in a custom entrypoint script: #!/bin/bash
# Check for the existence of a specific file
if [ -f /path/to/your/checkfile ]; then
echo "Container was not properly recreated. Exiting."
exit 1
fi
# Continue with the normal startup process
exec "$@" You would then modify your For more detailed information, you can refer to the Debugging and Usage sections of the documentation. This comment was generated by Glime. |
Beta Was this translation helpful? Give feedback.
-
We do have detection for when this has not been done, but it emits a warning instead. This problem has been minimized with v14 release, as we use that logic to skip our startup scripts: docker-mailserver/target/scripts/start-mailserver.sh Lines 172 to 192 in 18d9d1a That should minimize the problem, but if anything else later makes an assumption that the container is in a predictable "fresh" state (say customization via |
Beta Was this translation helpful? Give feedback.
-
I've been running docker-mailserver as a test for a while, and I really like it.
One thing that worries me a bit is the requirement to always start it with
--force-recreate
or usedocker compose down
.I did some digging in github and the documentation, but I still have some questions.
If I understand correctly, the most important part is that the container needs to be recreated when is starts.
If I am correct, stopping it with "docker compose stop" isn't necessarily a problem, if you recreate the container as start.
Similarly I get the idea that using CRTL+C might even be possible (though I can imagine that it still could give some trouble).
Being that the most important part is recreating the container at start, I was wondering, isn't there some form of checking possible, that when the container starts, and notices a certain file exists for example, that is would error and immediately quit (preventing any damage to your data.
I'd really love to know if that's possible (would give me a warm a fuzzy feeling inside if the risk is minimized :-D).
Beta Was this translation helpful? Give feedback.
All reactions