Unable to customize mount volumes.
To Reproduce
Current vs. Expected behavior
I have set a custom mount path for the volume, but no matter how I try, the storage still goes to a default path: /var/lib/docker/volumes/n8n-n8n-93ecd0_n8n_data.
Provide environment information
CentOS Linux release 7.9.2009 (Core)
Linux version 3.10.0-1160.119.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Jun 4 14:43:51 UTC 2024
Which area(s) are affected? (Select all that apply)
Application
Additional context
No response
Hi, can you describe more in detail what are you expecting and what are you trying to achieve?
When you create File volumes it goes to /etc/dokploy/[app or compose]/appName/files
Thank you for your response, this is not a real bug, I will close the issue. @Siumauricio
@Siumauricio Hi, if I select database to deploy, the volume will in /var/lib/docker in default. However, I hope to store all data from database into the non-system disk. How to do? create a soft link for docker or volume dir?
Sorry for necroposting but I have the same problem. I want to keep the file for my docker compose volume in a folder outside the /etc/dokploy for external reasons. Is there a way to rebind where "../files" points?
Sorry for necroposting but I have the same problem. I want to keep the file for my docker compose volume in a folder outside the /etc/dokploy for external reasons. Is there a way to rebind where "../files" points?
Have you figured out a solution for that?
Well I figured out that creating volumes for files with the mount path set to. ie. nginx.conf or ./nginx.conf always created directories... So I just named the volumes for configuration files to something like: nginx.txt and then in the docker-compose you'll need to reference them like:
volumes:
- ../files/nginx.txt:/etc/nginx/nginx.conf:ro
...only then it worked in my case.
The documentation also did help to figure out the 'files' path you'll need to use.
I’m having problems mounting repository files with the following volume definitions:
volumes:
- odoo-data:/var/lib/odoo
- ./:/mnt/extra-addons/va_subscription_18
- ./docker/config/odoo.conf:/etc/odoo/odoo.conf
The container runs, but the files and directories from the repo are not visible inside. This only happens when deployed via Dokploy AutoDeploy from Bitbucket. It works fine locally and even on the same server when using docker compose up manually.
Well I figured out that creating volumes for files with the mount path set to. ie. nginx.conf or ./nginx.conf always created directories... So I just named the volumes for configuration files to something like: nginx.txt and then in the docker-compose you'll need to reference them like:
volumes: - ../files/nginx.txt:/etc/nginx/nginx.conf:ro...only then it worked in my case.
The documentation also did help to figure out the 'files' path you'll need to use.
This also works for React nixpacks deploy for SPA routing refresh/deep link. You can mount the file in the UI so mine looks like this
File Path: nginx.txt
Mount Path: /etc/nginx/conf.d/default.conf
Content:
... original ....
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html; # key line to make React Router Work
}
.... original ....
Thank you -> @heijmerikx !!
I have been looking for this for a couple days and tried every answer on the internet / LLM. Found another answer but it said thats easy just mount a file lol. I am going to find that one and link it to this one.