Linux Standards Violation: Incorrect Storage of Docker Volumes and Logs
To Reproduce
Description
Dokploy is storing Docker volumes and logs in the /etc/dokploy directory, which is a violation of Linux standards. Specifically, the directories /etc/dokploy/compose and /etc/dokploy/logs are used for storage, which is not in compliance with the Linux Filesystem Hierarchy Standard (FHS).
Proposal:
Update Dokploy to store Docker volumes in a directory like /var/lib/docker or a dedicated data directory. Move logs to /var/log/dokploy or a similar directory. Update the Dokploy configuration to reflect the new storage locations. Rationale:
Adhering to Linux standards ensures that Dokploy integrates seamlessly with the Linux ecosystem and follows best practices for system administration. This change will also improve the overall structure and organization of the Dokploy project.
Steps to Reproduce:
- Install and run Dokploy on a Linux system.
- Verify that Docker volumes are stored in /etc/dokploy/compose and logs are stored in /etc/dokploy/logs.
Current vs. Expected behavior
Expected Behavior:
According to the FHS, /etc should only contain system configuration files, not data or logs. Docker volumes should be stored in a directory like /var/lib/docker or a dedicated data directory, and logs should be stored in /var/log.
Actual Behavior:
The current implementation of Dokploy stores Docker volumes in /etc/dokploy/compose and logs in /etc/dokploy/logs, which is not compliant with the FHS.
Provide environment information
Operating System: all linux
Dokploy version: all versions
Which area(s) are affected? (Select all that apply)
Installation, Application
Additional context
This issue is important for maintaining a clean and organized file system, adhering to established standards, and ensuring a better user experience.
i.e. It's best practices to keep the /etc/ in a git repo (pkg: etckeeper), which would have to digest userdata (volumes) & and logs which definitly do not belong there.
Maybe we will change to another directory. I understand that may appear some problems but now we don't have some problems with directory
Hi, thanks for the detailed explanation, you are indeed right that we should not use the /etc/dokploy directory to store data or application logs, I think we could use your recommendation to store them somewhere else, however this is not something we can change at this time because internally we use the references to the directories that are created from the installation and changing this at any time would result in an error in all instances that use dokploy, I think in a major version we could change the installation path and also internally in dokploy.
One solution could be to effectively move files to correct destination: /var/log /var/dokploy/applications/ /var/dokploy/compose/ /var/dokploy/monitoring/ ... add some links in /etc/dokploy to the real destination for backward compatibility while the dokploy contributors are making related changes to the code. Once a version that can fully support the new location will be deployed, it could check for files in correct location and automatically remove the links in /etc when they are not needed anymore.