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

[FR] Improve Docker deployment #6303

Closed
2 tasks done
ChristianSchindler opened this issue Jan 21, 2024 · 7 comments
Closed
2 tasks done

[FR] Improve Docker deployment #6303

ChristianSchindler opened this issue Jan 21, 2024 · 7 comments
Labels
docker Docker / docker-compose enhancement This is an suggested enhancement or new feature setup Relates to the InvenTree setup / installation process

Comments

@ChristianSchindler
Copy link

Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

Problem statement

I want to suggest to simply the deployment of Docker.

  1. I would like that you only need no longer a Server and worker but only use 1
  2. invoke updates of the db when you start a newer version of the container and updates are done
  3. many include also Nginx

Suggested solution

For the first two make a script with first checks if we are in first created, update or reboot and run invoke update then start both process

Describe alternatives you've considered

Implent it directly in the docker file but this makes it more complex

Examples of other systems

No response

Do you want to develop this?

  • I want to develop this.
@ChristianSchindler ChristianSchindler added enhancement This is an suggested enhancement or new feature triage:not-checked Item was not checked by the core team labels Jan 21, 2024
@matmair matmair added docker Docker / docker-compose setup Relates to the InvenTree setup / installation process and removed triage:not-checked Item was not checked by the core team labels Jan 22, 2024
@matmair
Copy link
Member

matmair commented Jan 22, 2024

I am not sure how scalable and reliable the system would be with the suggested changes, after all we have deployments with 100k+ items and hundreds of background tasks a minute so this is certainly something that would need extensive validation with power users.

  1. Would be a no for me - invoke updates does more than just DB updates and only running those can lead to problems (we have automigrations as an option in the config file but it presents problems form time to time and is off by default). Running a full update cycle can take minutes on larger deployments - probably leading to a lot of confusion if InvenTree suddenly just isn't comming up
  2. I do not understand this point, could you expand this a bit?

@ChristianSchindler
Copy link
Author

  1. If you want to scale, this is still entirely possible. Then you can use it without the script similar to it is now, but most will not need it, and that's a way for it to be as easy as possible. (first implementation of improved docker #6305 (comment))
  2. Regarding the update, I would only trigger it if you, as a developer, said in a release that we have changed and it must be done, or else it does not run. And then it only happens if you manually update the docker container version.
  3. I am also not sure if it makes sense to add Nginx to the application. The main problem I have that I had the problem that I had to manually restart it after some updates

@matmair
Copy link
Member

matmair commented Jan 22, 2024

  1. I do not think we will support this approach
  2. invoke update has to be run after every upgrade - this is essential for a functioning instance. I do not see a value in this beeing controlable
  3. We do not ship a static file hoster (the debug server is not designed to handle this) so a webserver is a must

@ChristianSchindler
Copy link
Author

If we run invoke update on every update it makes even more sense to automate it because then it is less likely to get user errors

@SchrodingersGat
Copy link
Member

@ChristianSchindler I am happy to consider a PR which can run invoke update on container start, if it needs to be updated - but I am not keen to change the overall construct of the container services (i.e. combining two containers into one).

@ChristianSchindler
Copy link
Author

@SchrodingersGat I think also that this is the most important part. What happens when the worker is running and invoke update simultaneously? Does this crash something?

Copy link
Contributor

This issue seems stale. Please react to show this is still important.

@github-actions github-actions bot added the inactive Indicates lack of activity label Mar 24, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2024
@matmair matmair removed the inactive Indicates lack of activity label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Docker / docker-compose enhancement This is an suggested enhancement or new feature setup Relates to the InvenTree setup / installation process
Projects
None yet
Development

No branches or pull requests

3 participants