Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: docker support #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: docker support #2

wants to merge 2 commits into from

Conversation

zogot
Copy link

@zogot zogot commented May 29, 2022

This add a Dockerfile to provide this as a docker image.

This will probably need some extra from your end if you want to publish this to Dockerhub as then an addition could be made to the README.md.

Final Docker Image size:

179MB - 175MB of that is node:16-slim

Reasons for specific things in the Dockerfile:

  1. Why npm install --production instead of npm ci in 'productionDependencies' stage.

A comparison with the size of node_modules from npm ci vs npm install --production:

Command Size of node_modules
npm ci 250M
npm install --production 4.7M

Can check with docker run -it --entrypoint=/bin/bash waitehr:ci if you build with making the changes to the Dockerfile to use the different commands

  1. Why tini and what for?

This is for proper handling of signals. Without tini the yargs command doesnt terminate correctly. I think it would be possible to have proper handling of signals but might be a more significant code change.

With tini the listening for SIGINT works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants