Open bradjones1 opened 5 years ago
I'm accomplishing this with an init container for the moment, however it seems like this would be appropriate in the entrypoint script, as well.
Same issue..., what I did is I created another script that tries to find .lock file and if found it deletes then runs the startup process. Sound similar to you @bradjones1 ?
@Alwandy The official K8s way of doing this would be to use an init container to do what you just described, then run the application. It would be good to include that logic inside this image directly, but an init container allows you to run your setup tasks (like deleting the lock file) without having to build your own image just to add a line to the entrypoint script.
@bradjones1 thanks, what I did is just do this for docker:
# Delete .lock before launching JIRA again (USING SED) RUN sed --in-place '1 a rm -f /var/atlassian/jira/.jira-home.lock;' /opt/atlassian/jira/bin/start-jira.sh
I hope this can be prioritised in any way...
When a pod is killed, Jira doesn't clean up its lock file in the home directory. Atlassian's own documentation (well, blog post) shows a bootstrap script that removes the existing lock file, if found. Should we do the same here?