JRaviLab / molevolvr2.0

WIP new molevolvr app
https://molevolvr.netlify.app/
1 stars 10 forks source link

Docker Scaffolding #3

Closed falquaddoomi closed 3 months ago

falquaddoomi commented 4 months ago

This PR adds the following:

I'll be submitting a PR for the backend shortly that implements a more fleshed-out API and other supporting bits for the backend, but I didn't want to complicate this PR with it. I anticipate that we can get this PR approved first, then I'll submit the second backend PR that contains a more concrete skeleton of the API, and get that merged. We can then start integrating the frontend into the backend and iterate on the backend API and schema as needed.

At the moment, this builds and runs the frontend at http://localhost:5713, and the plumber API at http://localhost:9050. You should be able to access both after copying your .env.TEMPLATE as .env and invoking ./run_stack.sh.

netlify[bot] commented 4 months ago

Deploy Preview for molevolvr ready!

Name Link
Latest commit 44e23c9379a7c36e208b30d03c8a72c01bf6344c
Latest deploy log https://app.netlify.com/sites/molevolvr/deploys/66a955c10709f1000817a473
Deploy Preview https://deploy-preview-3--molevolvr.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

vincerubinetti commented 3 months ago

Something that might be useful, since we may have many people on the team running this locally, is to open the webapp automatically when running the stack. Normally this is easy by just running vite --open, but it seems like it'll be more of a pain to do that when running the vite command from docker. Perhaps you could add a simple open localhost:5173 command near the end of run_stack after some timeout or perhaps waiting for some stdout output to indicate that the stack is ready.

One of the benefits of vite --open (other than being very simple) is that it won't open another tab if one is already open.

falquaddoomi commented 3 months ago

So, I've added a very work-in-progress production configuration that actually uses the release target from app/Dockerfile. If you want to test it, you can run ./run_stack.sh prod and then open http://localhost to see that it does in fact correctly build and serve the app bundle.

I believe I've addressed your other points, @vincerubinetti, but please let me know if I missed something. Also, thank you very much for the thorough review and commentary!