-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the app files atomically and docker stop first before starting up for succeeding commits #70
base: master
Are you sure you want to change the base?
Conversation
…iles replace files atomically
Hi @asakapab0i, and thanks for the contribution. Could you just explain what problem you encountered in your case, due to the removal and replacement of the Regarding the compose restart, I'm afraid it would not work in all cases, especially if a previous commit made the stack unstable. In this case a |
Hi @crohr , thanks for looking into this PR, So what happens is whenever a new commit / build is triggered it creates an error where it says the template files are not found I suspect it is because during the build process it deletes the files and recreates the app. It does work when the docker is restarted or stopping and starting the docker-compose manually. As for the docker restart, I figured it wouldn't work since it wouldn't be able to apply the new changes since it requires a --build parameter to rebuild. |
@@ -89,7 +89,7 @@ def public_dns | |||
|
|||
def url | |||
scheme = (default_port == "443" ? "https" : "http") | |||
"#{scheme}://#{public_dns}:#{default_port}" | |||
"#{scheme}://#{public_dns}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_port should be kept if different than a standard port, but yes can be removed if 443 or 80
When you say "it" creates an error, do you mean your application, or the pullpreview action?
Maybe we should instead docker compose stop before updating code, but I never encountered this issue. Would be nice to get some more detail so that I can reproduce. |
The application fails to recognize the change in the application files. It says it cannot find the expected template files.
I'll spend some time reproducing it and maybe it just works for all other applications except ours, if that's the case I'll just include the docker stop on this PR. |
experimental: add lightsail dns zone support
add trycatch on create and delete domain
In django application, everytime a commit is added and the action triggers the script it loses the link to the original files and I think its because in the script it deletes and replace the app files.
So I added two things to ensure that the refreshed files are properly loaded.
Let me know your thoughts.