mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-15 14:52:05 -05:00
[GH-ISSUE #552] Mounted Prometheus.yml file is not working #694
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bbreunig on GitHub (Nov 25, 2025).
Original GitHub issue: https://github.com/Dokploy/templates/issues/552
Originally assigned to: @Siumauricio, @Copilot on GitHub.
Template Name
Prometheus
Relevant Logs of the Error
In Dokploy Volumes of the Prometheus template there is file
prometheus.ymldefined:However when looking into the configuration and also uncommenting parts of the file I noticed, that prometheus does not use the new configuration even after redeployments
mounted prometheus.yml
actual prometheus.yml
Steps to Reproduce the Error
cat /etc/prometheus/prometheus.ymlEven more advanced:
cat /etc/prometheus/prometheus.ymlEnvironment Information
When does this error occur?
After successful deployment
Additional Context
Will you send a PR to fix it?
Maybe, need help
@BrunoMont2003 commented on GitHub (Dec 18, 2025):
Hi! I've found the solution for this bug. It seems the volume mapping for the configuration file needs to be explicitly defined in the docker-compose.yml within the template to override the default internal file correctly.
You need to add the volume mount for the prometheus.yml file. Here is how the service configuration should look:
By adding - ../files/etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro, Dokploy will correctly map the file edited in the "Volumes" section to the path Prometheus is looking for.
@bbreunig commented on GitHub (Dec 18, 2025):
There is a seperate issue with this solution:
What I noticed is, that for some reason docker creates directories, where it should create files. I have not found a solution for that yet. The only workaround I have is to define all files I want to mount beforehand in a git repository and than connect this repository with dokploy and deploy from there. Only then, the file mount works.
@BrunoMont2003 commented on GitHub (Dec 18, 2025):
That happened to me too! It's best to delete the service and create a new one, but with the correct configuration, as I mentioned before!