cosmosdb-server icon indicating copy to clipboard operation
cosmosdb-server copied to clipboard

Add a Dockerfile for the cosmosdb-server service

Open hectcastro opened this issue 4 years ago • 2 comments

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:

  1. Add a Dockerfile that uses Node.js 12.x to install the necessary project dependencies to run cosmosdb-server within a container. In addition, add support to the server itself to gracefully shutdown when given a subset of UNIX signals (e.g., SIGINT, SIGTERM).
  2. 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_USERNAME and DOCKERHUB_TOKEN).

Additionally:

  • An instance of the GitHub Actions run publishing to azavea/cosmosdb-server can 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

hectcastro avatar Jan 06 '21 19:01 hectcastro

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.

nkzawa avatar Jan 26 '21 16:01 nkzawa

No worries! Happy to reengage whenever the DockerHub account gets created.

hectcastro avatar Jan 27 '21 02:01 hectcastro