Skip to content

[Bug]: Volume bind creates a directory when expecting a file #7228

@yipfram

Description

@yipfram

Error Message and Logs

For example for Usesend certs (see #6997 docker compose file (the one i use)) :

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:751:18)
    at tryReadSync (node:fs:425:20)
    at readFileSync (node:fs:479:19)
    at x (/app/dist/server.js:2:458)
    at Object.<anonymous> (/app/dist/server.js:2:476)
    at Module._compile (node:internal/modules/cjs/loader:1521:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
    at Module.load (node:internal/modules/cjs/loader:1266:32)
    at Module._load (node:internal/modules/cjs/loader:1091:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12) {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}

Or Invoice ninja trying to read supervisord.conf file, but it turned into a directory after redeploy bind.
Related: Discord support

Steps to Reproduce

It varies, but here is my latest problem reproduction:

  1. Deploy Invoice Ninja click and deploy
  2. Stop the service
  3. Remove supervisord.conf in /data/coolify/services/[INVOICE NINJA]
  4. Deploy I-N again
  5. See in terminal / in logs: supervisord.conf turned into a directory

Other reproduction with usesend:

  1. Install traefik certs dumper on server proxy (Check docs from my docs PR: Updating Unsend (now Usesend) service docs + documenting SMTP config coolify-docs#411)
  2. deploy usesend (via fix(service): add usesend configuration file and Remove unused unsend SVG #6997 ) and add the smtp part from the docs (at the end of the file)
  3. fill smtp url in the certs bind
  4. deploy
  5. See: If the certs dumper from the server proxy did not have time to add the certs by itself, the bind will create a directory with the names..

Example Repository URL

No response

Coolify Version

v4.0.0-beta.442

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 22.04

Additional Information

TL;DR : When deploying a service, if the file should exist (after restarting a stopped service, or because you use bind for a file in the server), coolify will create a directory at the place of the file...

=> supervisord.conf should exist
-> If it does not exist, coolify create supervisord.conf as a directory

Same for usesend: certs file (cert.pem key.pem) should exist:
-> If it doesn't, coolify create 2 directories : Cert.pem & key.pem , which brakes the service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions