Skip to content

#63 Standardize Docker Compose service names#337

Merged
maneeshaxyz merged 2 commits into
LSFLK:mainfrom
prdai-archive:fix/issue-63-standardize-service-names
May 22, 2026
Merged

#63 Standardize Docker Compose service names#337
maneeshaxyz merged 2 commits into
LSFLK:mainfrom
prdai-archive:fix/issue-63-standardize-service-names

Conversation

@prdai
Copy link
Copy Markdown
Contributor

@prdai prdai commented May 20, 2026

Closes #63.

Renames docker-compose services + container_names to <app>-server convention; updates referencing scripts, configs and docs.

  • smtp-server / smtp-server-containerpostfix-server
  • raven container → raven-server
  • redis (rspamd-redis) → redis-server
  • unbound (rspamd-unbound) → unbound-server
  • thunderthunder-server
  • metadata-servicemetadata-server
  • loki / promtail / prometheus / cadvisor*-server
  • grafana (grafana-local) → grafana-server

Exporters and init jobs left as-is.

Note: AI assistance used for grep-based reference discovery and find/replace.

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
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 20, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread services/docker-compose.yaml Outdated
Comment thread services/docker-compose.yaml Outdated
Comment thread services/docker-compose.yaml Outdated
Copy link
Copy Markdown
Collaborator

@Aravinda-HWK Aravinda-HWK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

https://github.com/maneeshaxyz/silver-config

@prdai
Copy link
Copy Markdown
Contributor Author

prdai commented May 21, 2026

@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

Copy link
Copy Markdown
Collaborator

@Aravinda-HWK Aravinda-HWK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @maneeshaxyz Could you please run e2e testing in the server and verify this?

@maneeshaxyz
Copy link
Copy Markdown
Member

maneeshaxyz commented May 22, 2026

@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 silver-*

services
├── postfix
├── raven
├── redis
├── unbound
├── thunder
├── silver-metadata
├── loki
└── grafana

@maneeshaxyz
Copy link
Copy Markdown
Member

@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 silver-*

services
├── postfix
├── raven
├── redis
├── unbound
├── thunder
├── silver-metadata
├── loki
└── grafana
services
├── smtp-server        -> postfix
├── raven-server       -> raven
├── opendkim-server    -> opendkim
├── rspamd-server      -> rspamd
├── redis              -> redis
├── unbound            -> unbound
├── clamav-server      -> clamav
├── clamav-exporter    -> clamav-exporter
├── thunder-db-init    -> thunder-db-init
├── thunder-setup      -> thunder-setup
├── thunder            -> thunder
├── certbot-server     -> certbot
├── metadata-service   -> silver-metadata
├── postfix-exporter   -> postfix-exporter
├── node-exporter      -> node-exporter
├── cadvisor           -> cadvisor
├── loki               -> loki
├── promtail           -> promtail
├── prometheus         -> prometheus
└── grafana            -> grafana

I suggest this naming convention.

@Aravinda-HWK
Copy link
Copy Markdown
Collaborator

@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 silver-*

services
├── postfix
├── raven
├── redis
├── unbound
├── thunder
├── silver-metadata
├── loki
└── grafana
services
├── smtp-server        -> postfix
├── raven-server       -> raven
├── opendkim-server    -> opendkim
├── rspamd-server      -> rspamd
├── redis              -> redis
├── unbound            -> unbound
├── clamav-server      -> clamav
├── clamav-exporter    -> clamav-exporter
├── thunder-db-init    -> thunder-db-init
├── thunder-setup      -> thunder-setup
├── thunder            -> thunder
├── certbot-server     -> certbot
├── metadata-service   -> silver-metadata
├── postfix-exporter   -> postfix-exporter
├── node-exporter      -> node-exporter
├── cadvisor           -> cadvisor
├── loki               -> loki
├── promtail           -> promtail
├── prometheus         -> prometheus
└── grafana            -> grafana

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.
@prdai
Copy link
Copy Markdown
Contributor Author

prdai commented May 22, 2026

hi @Aravinda-HWK @maneeshaxyz i updated the naming per the convention provided, let me know if there is any other changes required thanks! :))

@prdai prdai requested a review from Aravinda-HWK May 22, 2026 05:33
Aravinda-HWK pushed a commit to maneeshaxyz/silver-config that referenced this pull request May 22, 2026
…>-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.
@Aravinda-HWK
Copy link
Copy Markdown
Collaborator

hi @Aravinda-HWK @maneeshaxyz i updated the naming per the convention provided, let me know if there is any other changes required thanks! :))

Renaming is LGTM and tested in the server setup and having no issue.

Copy link
Copy Markdown
Collaborator

@Aravinda-HWK Aravinda-HWK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maneeshaxyz
Copy link
Copy Markdown
Member

LGTM.

@maneeshaxyz maneeshaxyz merged commit c257810 into LSFLK:main May 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize service names in Docker Compose for consistency

4 participants