prestige icon indicating copy to clipboard operation
prestige copied to clipboard

Docker integration

Open MattTennison opened this issue 3 years ago • 1 comments

What?

This PR will add Docker support to the Prestige project

Related Issue: https://github.com/sharat87/prestige/issues/5

Current state of PR

Front-end is completed, it serves the built files using nginx and works as expected.

Backend has been started locally, but running into issues potentially due to my lack of Python experience. The app looks to run on Heroku, so I think I need to make a image that

  1. Installs Python dependencies
  2. Starts the application by running the migrate command, and running the application itself in gunicorn as per the Procfile

MattTennison avatar Jun 27 '21 08:06 MattTennison

Hey @MattTennison, sorry, got to reviewing this only now. I see that we are building the frontend code inside the Docker build process. That would mean the Docker image needs NodeJS, like it currently does. Instead, I'd say let's do the building of the frontend code outisde and the Docker container be super light, probably based on something like the nginx container, essentially just a static file server, serving the built artifacts. This will mean we need two commands to build the Docker image, one for building frontend code, and another for docker build .. I'd say that's okay, we can add another target in our makefile like make build-docker-frontend (and make build-docker-backend). Does that make sense?

Also, I'm not sure I'm in favor of the .dockerignore file. Can we instead explicitly copy only the things we need in the Dockerfile, instead of excluding the ones we don't? Essentially using a whitelist of what needs to be copied, vs a blacklist of what needs to be ignored.

Thanks for you work man!

sharat87 avatar Jun 29 '21 08:06 sharat87

Closing since it's been over a year without any activity, and the project now has a Dockerfile already. Thank you for all your support! :)

sharat87 avatar Aug 28 '22 09:08 sharat87