GeezerVison is showing github.com — fix/observability: Prometheus read only root volume by marcleblanc2 · Pull Request #1479 · sourcegraph/deploy-sourcegraph-docker
Conversation
Problem
Some customers need a read-only root filesystem on every container, and still need Alertmanager to work
The prometheus service couldn't be read_only, because Alertmanager wrote to the root filesystem
Solution
Add read_only: true to the prometheus service
sourcegraph/sourcegraph#18737 moves Alertmanager's files onto the /prometheus data volume.
Do not merge this PR until the pinned prometheus image includes it.
Test plan
Ran this branch with the image Buildkite built from sourcegraph/sourcegraph#18737:
prometheus starts read-only, with no read-only or permission errors
observability.alerts and observability.silenceAlerts reach Alertmanager, and a webhook receives the notifications
- Upgrading from
main with the released prometheus:8.1.4690 to this branch works on the same volume
docker compose stop takes 0.5 seconds, so the default 10 second grace period is enough
- Control: the released
prometheus:8.1.4690 fails with open /sg_config_prometheus/alertmanager.yml: read-only file system
- The rest of the results are in sourcegraph/sourcegraph#18737
Linked PRs
Merge in this order, because the two deploy PRs need a prometheus image with the fix:
- Image fix: sourcegraph/sourcegraph#18737
- Helm: fix/observability: Prometheus read only root volume deploy-sourcegraph-helm#1000
- Docker Compose: fix/observability: Prometheus read only root volume #1479
Amp threads
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
marcleblanc2
changed the title
docker-compose: Run prometheus with a read-only root filesystem
fix/observability: Prometheus read only root volume
Nov 11, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.