hooram / ownphotos

Self hosted alternative to Google Photos
MIT License
2.77k stars 233 forks source link

Docker images for front-end and back-end should be built separately #41

Closed depau closed 5 years ago

depau commented 6 years ago

The current Dockerfile (and the one I updated with #40) build an image that contains both the front-end and the back-end.

It might be a better practice to build them separately, and using Docker Compose to orchestrate all the containers and run everything automatically.

Also, I noticed that the entry point builds JS stuff on startup. I think it might be better if it were built at image build time, as unless changes are placed in a volume, they're lost when the container is stopped/restarted.

guysoft commented 5 years ago

This is starting to happen, see this setup: https://github.com/hooram/ownphotos-frontend/blob/dev/docker-compose.yml#L27

The only thing that is left is to remove the frontend form the Dockerfile and then image would be much lighter!

guysoft commented 5 years ago

This is also part of PR #46