cosmosdb-server
cosmosdb-server copied to clipboard
Add a Dockerfile for the cosmosdb-server service
This PR includes two distinct changes, but they're split across separate commits in case it isn't desirable to merge both at this time:
- Add a
Dockerfilethat uses Node.js 12.x to install the necessary project dependencies to runcosmosdb-serverwithin a container. In addition, add support to the server itself to gracefully shutdown when given a subset of UNIX signals (e.g.,SIGINT,SIGTERM). - Within a separate GitHub Actions workflow, build and publish the project container image to Docker Hub using credentials provided to the GitHub Actions execution context (e.g.,
DOCKERHUB_USERNAMEandDOCKERHUB_TOKEN).
Additionally:
- An instance of the GitHub Actions run publishing to
azavea/cosmosdb-servercan be found here. - Testing can be accomplished using that same published container image via:
$ docker run --rm azavea/cosmosdb-server:hmc-docker-support
Ready to accept connections at [::]:45751
^CAttempting a graceful shutdown...
Existing connections closed. Exiting...
Fixes https://github.com/vercel/cosmosdb-server/issues/33
Thank you for the PR and sorry for the delay. The PR looks great but it's not ready to merge because we don't have an official account on dockerhub yet. I'm asking if we can prepare one.
No worries! Happy to reengage whenever the DockerHub account gets created.