Skip to content
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

swarm mode for VIM #175

Open
homework36 opened this issue Jan 21, 2025 · 6 comments
Open

swarm mode for VIM #175

homework36 opened this issue Jan 21, 2025 · 6 comments

Comments

@homework36
Copy link

For production, we would like to have containers self check and restart if needed. Therefore, we will need a YML file for the Docker swarm mode.

@dchiller
Copy link
Contributor

Checks and restarts are available with docker compose in non-swarm mode (eg healthcheck)... I think swarm is for multiple nodes?

@homework36
Copy link
Author

Checks and restarts are available with docker compose in non-swarm mode (eg healthcheck)... I think swarm is for multiple nodes?

Thank you! I wasn't aware of this. Do we have checks and restarts implemented already? Sometimes our containers will fail (see logs below), which results in 502 nginx error, and we have to manually restart the container.

Image

In addition to the setting in docker compose, I think the current prod instance might be too small with 1 vCPU and 1.5 GiB RAM. Should we resize for a larger one?

@dchiller
Copy link
Contributor

Do we have checks and restarts implemented already?

Looks like we do for some of the services and not for others (see here. The postgres container has a healthcheck and will restart automatically based on the unless-stopped rule. Looks like nginx will also restart. The django app container doesn't restart currently.

@homework36
Copy link
Author

Would it make sense to consider adding healthchecks for the remaining containers as well?

Do we have checks and restarts implemented already?

Looks like we do for some of the services and not for others (see here. The postgres container has a healthcheck and will restart automatically based on the unless-stopped rule. Looks like nginx will also restart. The django app container doesn't restart currently.

@dchiller
Copy link
Contributor

Would it make sense to consider adding healthchecks for the remaining containers as well?

Adding a restart instruction to the app container seems like it would be useful based on what you are describing, although it's probably also worth figuring out what's going on to cause those timeouts.

Perhaps there are relevant health checks, too...what they are depends on what you want to monitor.

@fujinaga
Copy link
Member

In addition to the setting in docker compose, I think the current prod instance might be too small with 1 vCPU and 1.5 GiB RAM. Should we resize for a larger one?

If possible, yes. I'd like UMIL to be responsive as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants