Closed blairun closed 1 week ago
Thank you for your contribution.
This works fine, but I wonder if it's really necessary and for what exactly? Once built, Numbat is a static web application. It can be "deployed" by simply copying it to a server. During development, I just run python -m http.server
to work with it (see https://github.com/sharkdp/numbat/blob/master/numbat-wasm/README.md).
Thanks for the feedback. Docker support is just meant as an alternative for those who prefer containerized deployments. I prefer deploying numbat this way for its isolation, portability, and ease of setup and maintenance. Of course, if you don't think it fits in the current scope of the project, I completely understand.
I must say I’m a bit lost here as well, once you have your nginx running in your container you still need to write some conf from the host machine right? Like, configure the host nginx to do a reverse proxy to your numbat container? In this case, it always seems easier (and less error-prone) to simply make nginx point to the static website.
Adding support for Docker in this repository means we would have to maintain the Docker container. Your PR doesn’t have a large surface area, but basically, it means we’ll have to update the Docker image as soon as possible and republish it every time Nginx or Alpine has a CVE or something (which happened not that long ago on Alpine iirc). It seems better to rely on the host nginx directly for security and maintenance on our side imo
Tentatively closing this for now.
Add Docker support for web deployment
This pull request adds Docker support to easily deploy the Numbat web application. It includes a
Dockerfile
for building the application and adocker-compose.yaml
for orchestrating the deployment.Changes
New file:
Dockerfile
Added a multi-stage
Dockerfile
that:New file:
docker-compose.yaml
Added a
docker-compose.yaml
file that:How to use
To deploy the Numbat web application using Docker:
docker-compose up --build
to build and start the container.http://localhost:8192
.Notes
docker-compose.yaml
file includes two build options. Uncomment the preferred option before running.docker-compose.yaml
file if needed.Testing
docker-compose.yaml
file.