ente
ente copied to clipboard
Add Dockerfile for the web app
Description
A dockerfile for the web application to build and prepare a ready to deploy container with customizable endpoints.
API endpoints and Albums endpoints can be set a the execution of the container with two environment variables:
-
ENTPOINT
the museum endpoint -
ALBUMS_ENDPOINT
another host that points to the same front-end.
By default the nginx base image expose port 80 so an image build with the given docker file can be used like this:
docker build -t ente-web web --build-arg git_sha=AN_OPTIONNAL_GIT_SHA
docker run -p 8081:80 -p 8081:80 -e ENDPOINT=<your_museum_endpoint> -e ALBUMS_ENDPOINT=http://localhost:8082 ente-web
I had to modify web/packages/next/next.config.base.js
in order to be able to set the GIT_SHA without calling git.
I've cherry-picked the change to next.config.base.js (well, effectively something that get the same functional result by making the git sha an optional property) in https://github.com/ente-io/ente/pull/1073
As for the dockerfile, we'll let that be part of the docs only for now, but I'll definitely continue thinking more how to integrate this better in the repo itself (https://github.com/ente-io/ente/pull/1066#issuecomment-1993453853).
Thank you, again 🙏