Dokploy / Dokploy/dokploy

v0.30.6 image ships empty /app/node_modules/postgres/package.json → ERR_INVALID_PACKAGE_CONFIG

Open
#5,435 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage🔍
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

To Reproduce
  1. Have a Dokploy instance running dokploy/dokploy:v0.30.6.
  2. Force the container to be recreated — e.g. reboot the host, or run
    docker service update --force dokploy. An already-running container keeps
    working, so the bug only surfaces on recreation.
  3. The dokploy service never reaches 1/1 and Swarm restarts it in a loop:

$ docker service ls
ID NAME MODE REPLICAS IMAGE
zyxnn22xn794 dokploy replicated 0/1 dokploy/dokploy:v0.30.6

  1. Logs show Node failing before startup:
    [wait-for-postgres] Postgres is reachable
    Error: Invalid package config /app/node_modules/postgres/package.json while importing "postgres" from /app/dist/migration.mjs
    at Object.read (node:internal/modules/package_json_reader:110:33)
    at packageResolve (node:internal/modules/esm/resolve:769:43)
    at moduleResolve (node:internal/modules/esm/resolve:853:18)
    code: 'ERR_INVALID_PACKAGE_CONFIG'
    Node.js v24.4.0

  2. The file is empty in the published image. This reproduces on a clean pull on any machine, so it is not local layer corruption

$ docker run --rm --entrypoint sh dokploy/dokploy:v0.30.6 -c 'wc -c /app/node_modules/postgres/package.json'
0 /app/node_modules/postgres/package.json

$ docker run --rm --entrypoint sh dokploy/dokploy:v0.30.5 -c 'wc -c /app/node_modules/postgres/package.json'
1814 /app/node_modules/postgres/package.json

Affected digest: sha256:1d6bd69ba58c1b4e305a9a33d77d8c3e0ee34707169f680cc600ab7ef1c3e6d8

Workaround: docker service update --image dokploy/dokploy:v0.30.5 dokploy

Current vs. Expected behavior

Expected: after the container is recreated, the dokploy service starts normally and reaches 1/1, exactly as it does on v0.30.5.

Current: the container exits with code 1 on every start, before the server ever comes up. Swarm keeps rescheduling it, so the service stays at 0/1 indefinitely and the dashboard is unreachable (curl http://localhost:3000 refuses the connection). Node fails while resolving the postgres import because the package's package.json in the image is 0 bytes.

The instance had been running fine for weeks. It only broke after an unattended kernel upgrade rebooted the host, which forced Swarm to recreate the container from the image. Postgres, Redis and Traefik all stayed healthy — only the dokploy service was affected.

Provide environment information
Operating System:
  OS: Ubuntu 24.04
  Arch: x86_64
  Kernel: 6.8.0-139-generic
Dokploy version: v0.30.6
Docker: Swarm mode, single node
Postgres: 16
VPS Provider: Hostinger
What applications/services are you tying to deploy?
  Two static frontend apps (unaffected - they kept running at 1/1).
  The failure is in the dokploy service itself, which never starts.
Which area(s) are affected? (Select all that apply)

Docker Compose, Docker

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

No response

Will you send a PR to fix it?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing /app/node_modules/postgres/package.json in the v0.30.6 and v0.30.5 images, then inspect the image build inputs that produce /app/dist/migration.mjs and the dependency tree. Reproduce with the documented docker run and service recreation commands. Done means the published image contains a valid postgres package.json and the dokploy service starts at 1/1 without ERR_INVALID_PACKAGE_CONFIG.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, node.js, postgres, typescript
Domain
backend, build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.