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

Reduce unused services in Docker Compose #4108

Open
dhruvkb opened this issue Apr 14, 2024 · 2 comments
Open

Reduce unused services in Docker Compose #4108

dhruvkb opened this issue Apr 14, 2024 · 2 comments
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: mgmt Related to repo management and automations 🐳 tech: docker Involves Docker

Comments

@dhruvkb
Copy link
Member

dhruvkb commented Apr 14, 2024

Problem

The following services in Docker Compose are largely unused.

  • load_to_s3

    I could not find any occurrences of this string in the project except for the docker-compose.yml file. This leads me to suspect it might actually be completely unused.

  • nginx

    This runs the nginx target from the API Dockerfile. It's purpose in the local dev environment is unclear and building it when initialising the API slows down CI.

  • proxy

    proxy was added long back to test for HTTPS with the API server during local development. It also introduces a dependency on mkcert so removing it will have twice the benefit.

They should be removed or, if they are in fact used, comments should be added to list down what they are used for and where.

Additional context

This is part of a bigger improvement of the Docker Compose configuration that involves upgrading to v3 #4046 and is closely linked to #1910. This was also raised by @krysal in #1009.

@dhruvkb dhruvkb added 🟩 priority: low Low priority and doesn't need to be rushed ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🐳 tech: docker Involves Docker 🧱 stack: mgmt Related to repo management and automations labels Apr 14, 2024
@AetherUnbound
Copy link
Contributor

AetherUnbound commented Apr 15, 2024

  • load_to_s3
    I could not find any occurrences of this string in the project except for the docker-compose.yml file. This leads me to suspect it might actually be completely unused.

This service loads some testing data into the local minio instance, which is used currently for iNaturalist but could be expanded in the future. It should not be removed (unless we can find a similar mechanism for loading data into S3 on startup that doesn't involve a separate image).

@dhruvkb
Copy link
Member Author

dhruvkb commented Apr 15, 2024

@AetherUnbound thanks for clarifying! There might be ways to do this that don't involve a dedicated service but at the very least documenting this on the service itself would be helpful. It's also my bad that I did not look closely enough before making the assumption.

Also I don't know if this is an antipattern but if so, could you make an issue for us to investigate and find a more elegant solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: mgmt Related to repo management and automations 🐳 tech: docker Involves Docker
2 participants