fix(docker): ship scripts/ and wget so the cron service can start - #35
Merged
Merged
Conversation
docs/deploy-dokploy.md tells self-hosters to run scripts/cron.sh as a fourth service from the app image, but that service cannot start as written: the runner stage never copies scripts/, and node:20-slim does not include wget, which is what cron.sh calls the routes with. It fails quietly in the worst place. One of the three jobs is refresh-tokens, so without it the Instagram token expires after 60 days and every automation stops with no error anywhere: comments keep arriving and nothing answers them. Copy scripts/ into the runner stage and install wget, and note the third process in the header comment alongside web and worker.
|
@paularro is attempting to deploy a commit to the diwenne's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
The Dokploy guide tells self-hosters to run
scripts/cron.shas a fourth service from the app image:That service cannot start as written. The runner stage never copies
scripts/, andnode:20-slimdoes not includewget, which is whatcron.shcalls the routes with. The container exits immediately.It fails in the worst possible place, because
docs/deploy-dokploy.mdalready explains why: one of the three jobs isrefresh-tokens, so without it the Instagram token expires after 60 days and every automation stops with no error anywhere. Comments keep arriving and nothing answers them. A self-hoster who follows the guide exactly still ends up with a dead instance two months later.Change
COPY --from=build /app/scripts ./scriptsin the runner stagewgetandca-certificates, cleaning the apt lists in the same layerVerification
Running in production on a Hostinger VPS with exactly these two additions, alongside n8n behind the same Traefik. The cron container has been calling the routes on schedule:
And inside that container:
wgetinstalls clean onnode:20-slim(GNU Wget 1.21.3). Happy to swap the apt layer for anode -e "fetch(...)"call insidecron.shinstead if you would rather keep the image free of extra packages, but that changes the script for people running it outside Docker, so I went with the smaller diff.