appbaseio / dejavu

The Missing Web UI for Elasticsearch: Import, browse and edit data with rich filters and query views, create search UIs visually.

Home Page:https://dejavu.reactivesearch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure to propogate signals to Docker container

scottwlyft opened this issue · comments

Describe the bug
When running dejavu in a docker container in the foreground, SIGINT and SIGTERM signals are not propagating to the process.

Dejavu Version
Docker image: latest (as of 4/11/22)

To Reproduce
Steps to reproduce the behavior:

  1. Run docker run -p 1358:1358 --rm appbaseio/dejavu
  2. Press Ctrl+C

Expected behavior
The container should exit after pressing Ctrl+C

Desktop (please complete the following information):

  • OS: MacOS 12.3.1

Additional context
This is likely due to not using the exec syntax when running the CMD for node. This is a good article explaining it https://hynek.me/articles/docker-signals/
The likely fix is to use this form CMD ["node", "packages/dejavu-main/server.js"] in the Dockerfile. This is important because it enables any program that orchestrates running multiple processes (for example running elasticsearch, dejavu and and app) to safely kill this running container at shutdown time. It also allows the docker stop command to safely stop the dejavu server without using a force kill.

I ran into a yarn build error when trying to run docker build locally otherwise I would have put up a PR with the fix.