I am currently working on a custom cloud-based file storage system. The backend is almost done and supposed to be deployed on a personal computer or cloud-based server. The front-end is in progress and will be a Flutter app.
The backend is served by Nginx which is on top of a Node JS application that uses MongoDB as database and redis for the cache (as well as local storage for the files themselves).
In the best of world I would like to bundle all the back-end stack into one executable (and maybe one setup executable to install the required stack and configure it).
My question is, can NodeJS alone handle this ? I have searched and found out that one can set a starting script within the Node application but would it be sufficient ? Or should I go for some bash or even Java code to wrap everything ?
I don't really know in chat direction to look so I am really open to any suggestion here, what would be the best way to do this ?
Have you considered using docker and docker-compose?
You can create a DockerFile which is used to build your application container and include your whole stack in a docker-compose.yml file.
Then with having docker and docker-compose installed, you can bring your whole stack up in any environment.
For more info you can check out docker documentation, this article can also help you :)