Skip to content

File mounts doesn't work for auto deploy #5181

Closed

Description

@finnvyrn

To Reproduce

I have file mounts in advanced tab for a compose.

Then when i use the following in auto deploy (GitHub provider), it didn't work (not mounted). But when I use raw provider (raw compose file), it worked.

    volumes:
      - ../files/:/files/:ro

Version: v0.29.8

Which area(s) are affected? (Select all that apply)

Docker Compose

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

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

No

Activity

  1. linear-code commented on Aug 24, 2026

    @linear-code
  2. dosubot commented on Aug 24, 2026

    @dosubot

    @finnvyrn, this looks like the same underlying issue reported in #5152. Here's what's happening:

    When you deploy via the GitHub provider, Dokploy clones the repo and then runs docker compose up [1]. At that point, if the File Mount hasn't already written the host-side file, Docker's own bind-mount fallback creates an empty directory at the ../files/ path. Once that empty directory exists, Dokploy's createFileMount / updateFileMount functions silently fail to write to it — the catch block only console.logs the error without throwing, so the UI reports success even though nothing was actually written [2].

    With the raw provider, the compose file is written directly to disk without a clone step [3], so the timing is different and the directory doesn't get pre-created by Docker before the file mount is written.

    Workaround (from #5152):

    1. SSH into the server and rmdir the stray empty directory (e.g. /etc/dokploy/compose/<appName>/files/).
    2. Re-open the File Mount in the UI and hit Save — even without changes — to re-trigger the file write.
    3. Force the container to recreate (docker rm -f <container>, then redeploy) so Docker picks up the corrected mountpoint.

    A fix for this was submitted in #5153 [2] — tracking that PR should get you a permanent resolution.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dokploy with Dosu Add Dosu to your team

  3. added 2 commits that reference this issue on Aug 27, 2026
    87b9149
    ec8e645
  4. added a commit that references this issue on Oct 24, 2026
    1c66cbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions