#63 Standardize Docker Compose service names#337
Conversation
Rename docker-compose services and container_names to use the
"<app>-server" naming convention, and update all referencing
scripts, configs, and docs.
Service / container renames in services/docker-compose.yaml:
- smtp-server (smtp-server-container) -> postfix-server
- raven container raven -> raven-server
- redis (rspamd-redis) -> redis-server
- unbound (rspamd-unbound) -> unbound-server
- thunder -> thunder-server
- metadata-service -> metadata-server
- loki -> loki-server
- promtail -> promtail-server
- prometheus -> prometheus-server
- grafana (grafana-local) -> grafana-server
- cadvisor -> cadvisor-server
Updated references:
- depends_on chains in docker-compose.yaml
- dev/examples/docker-compose.override.yml
- scripts/user/{create_test_users,remove_test_users,manage_roles}.sh
- services/config-scripts/gen-postfix-conf.sh (raven -> raven-server hostname)
- services/metadata-service/README.md
There was a problem hiding this comment.
Code Review
This pull request standardizes service and container names across the Docker Compose configuration, primarily by appending "-server" to service identifiers (e.g., renaming smtp-server to postfix-server and redis to redis-server). These changes are propagated to helper scripts, configuration generators, and documentation. The review feedback points out that renaming services like redis and unbound may break connectivity or DNS resolution for dependent services if their internal configurations are not updated to the new hostnames. There is also a concern that changing the Grafana container name could break external scripts.
Aravinda-HWK
left a comment
There was a problem hiding this comment.
@prdai The below repo is the one that contains static configurations for running the mail system. Could you please check that repo, and what are the places that you need to update? I would suggest opening a PR in there if anything needs to change related to this PR.
|
@Aravinda-HWK checked the silver-config repo and put up a PR there: maneeshaxyz/silver-config#2, lmk if it looks good or if there's anything else that needs to change. thanks |
Aravinda-HWK
left a comment
There was a problem hiding this comment.
LGTM. @maneeshaxyz Could you please run e2e testing in the server and verify this?
|
@Aravinda-HWK, @prdai What do you think about dropping the -server suffix? And have the service name only for external services, I think that is cleaner. And for silver-specific services can folow |
I suggest this naming convention. |
@prdai I also would suggest this naming schema. That would be easy for the development. |
Rename docker-compose services and all cross-references to follow the naming convention proposed in PR review: drop the -server suffix from internal services and rename metadata-server to silver-metadata. - postfix-server -> postfix - raven-server -> raven - opendkim-server -> opendkim - rspamd-server -> rspamd - redis-server -> redis - unbound-server -> unbound - clamav-server -> clamav - thunder-server -> thunder - certbot-server -> certbot - metadata-server -> silver-metadata - cadvisor-server -> cadvisor - loki-server -> loki - promtail-server -> promtail - prometheus-server -> prometheus - grafana-server -> grafana Updates docker-compose.yaml, override example, user/utility scripts, config generators, and metadata-service README to use the new names.
|
hi @Aravinda-HWK @maneeshaxyz i updated the naming per the convention provided, let me know if there is any other changes required thanks! :)) |
…>-server Tracks LSFLK/silver#337 which standardizes docker-compose service names and container_names to the `<app>-server` convention. After that PR merges, Compose's internal DNS only resolves the new names — the old hostnames (`redis`, `rspamd-redis`, `unbound`, `loki`, `prometheus`, `cadvisor`, `raven`) used in this repo's mounted configs stop resolving and dependent services break (rspamd loses Redis + DNS, promtail loses Loki, Grafana loses both datasources, Prometheus loses cAdvisor scrape, Postfix loses Raven socketmap). Updated hostnames: - rspamd/redis.conf: rspamd-redis -> redis-server - rspamd/options.inc: unbound -> unbound-server - promtail/promtail-config.yaml: loki -> loki-server - grafana/provisioning/datasources/prometheus.yaml: prometheus -> prometheus-server - grafana/provisioning/datasources/loki.yaml: loki -> loki-server - prometheus/prometheus.yml: cadvisor:8080 target -> cadvisor-server:8080 - raven/conf/delivery.yaml: socketmap address raven -> raven-server Prometheus job/service labels left as `cadvisor` to avoid breaking existing Grafana dashboard queries that filter on the label. Note on raven/conf/delivery.yaml: the socketmap `address` is set to `raven-server:9100` to mirror the new container hostname. If this field is actually a self-bind, it should be `0.0.0.0:9100` instead — please confirm.
Renaming is LGTM and tested in the server setup and having no issue. |
|
LGTM. |
Closes #63.
Renames docker-compose services + container_names to
<app>-serverconvention; updates referencing scripts, configs and docs.smtp-server/smtp-server-container→postfix-serverraven-serverredis(rspamd-redis) →redis-serverunbound(rspamd-unbound) →unbound-serverthunder→thunder-servermetadata-service→metadata-serverloki/promtail/prometheus/cadvisor→*-servergrafana(grafana-local) →grafana-serverExporters and init jobs left as-is.
Note: AI assistance used for grep-based reference discovery and find/replace.