-
Notifications
You must be signed in to change notification settings - Fork 0
Wait for database if run on slow machine #10
Conversation
I would also have tried to check whether we can establish a connection to the database container... Did we try healtchecks in the docker-compose before? Edit: So basically we can do this |
I just learned recently about health checks but from my current understanding an unhealthy container on startup wouldn't trigger that |
Oh, I didn't read all your comments. Our current solution is basically equivalent to https://stackoverflow.com/a/61248971/3342058 |
…in docker-compose.yml
@kevihiiin's changes look good 😄 |
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.
I approve 😄
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.
Quite elegant solution. I think we should remove the build process from the container image itself, as we should do that anyway for javascript as it makes no sense to have node available in the main image. Will create another issue for that
@maltezacharias What is the build process for you? We're basically just installing ubuntu and python dependencies |
For me that would also include the following:
Is something that only needs to be run when a container is build and never again after. |
The build process for me is everything which happens when I run |
Yes, I meant exactly that, I would move
to the Dockerfile. The end-result would be that deploying would be completed by
I would also suggest to modify ENTRYPOINT to the remaining deploy.sh script, so that it would automatically be invoked when we run the container. |
The The idea behind the bind mount is that we can develop with the |
No, I think that's very clever and we should keep that possibility. I've been experimenting a bit and I think our best bet is a combination of That way we can add bind mounts to the override file, so they would work in dev and replace them with volumes in prod. I had a chat with @kevihiiin today as well and we also think that we should keep some of the bind mounts like logs and backup, but let's talk about that next weekend maybe? I will prepare an example during the week on the new repo and then we can discuss it. |
A first idea with the entrypoint is here: #21 |
Depends on #7
@kevihiiin It currently prints the error from the docker command we use to check the status. I tried to prevent the output but wasn't very successful. Do you have an idea for this?