fix(docker): exec the compose command instead of always starting the server - #546
Open
Eljees wants to merge 1 commit into
Open
fix(docker): exec the compose command instead of always starting the server#546Eljees wants to merge 1 commit into
Eljees wants to merge 1 commit into
Conversation
…server The entrypoint ignored its arguments, so faraday-default-worker started a second faraday-server and no Celery consumer ever ran; queued reports were never imported. Signed-off-by: Eljees <3.14hell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #544
docker/entrypoint.shends with a hardcoded server start and never looks at its arguments, so thecommand:from docker-compose is ignored by every container built on this image. In the default stackthat means
faraday-default-worker(compose declarescommand: [ "faraday-worker" ]) starts a secondserver instead of a Celery consumer:
and every report uploaded via CLI/Web UI/API queues in Redis forever (
redis-cli LLEN celerykeepsgrowing,
celery inspect ping→ "No nodes replied").The entrypoint now execs the passed command when there is one, and keeps the current behaviour when
there is none:
execalso makes PID 1 the actual service in both cases, so signals fromdocker stopreach theserver/worker instead of the shell.
The init part of the script (server.ini creation, migrations) still runs for the worker as before —
the worker starts with
depends_on: service_healthy, so it takes the "Using existing server.ini" branch;this PR does not change that behaviour, it only stops the worker from turning into a second server.
Verified
bash -n docker/entrypoint.shclean, plus a stub run (fakefaraday-server/faraday-manage/ncon PATH,existing
server.ini):AI-assisted (LLM used for drafting); the change and the runs above are mine.