Skip to content

Finalize mail and Nextcloud bootstrap for Traefik/k3s deployment - #7

Draft
angeloreale with Copilot wants to merge 7 commits into
mainfrom
copilot/finalize-mail-server-implementation
Draft

angeloreale with Copilot wants to merge 7 commits into
mainfrom
copilot/finalize-mail-server-implementation

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown

This updates the mail and cloud deployment assets so a fresh server can generate working Docker Compose configs and convert them more cleanly toward k3s/Traefik. It also makes the required secrets and environment contract explicit for mail routing, Nextcloud, storage, and database setup.

  • Mail routing and compose correctness

    • Corrects Traefik TCP router behavior for mail protocols by distinguishing plain TCP/STARTTLS ports from implicit TLS passthrough ports.
    • Exports the full mail port set needed by compose-to-k8s tooling: SMTP, submission, IMAP, IMAPS, POP3, POP3S, and Sieve.
    • Keeps the mail service aligned with the existing Traefik ingress model instead of relying on Docker-only assumptions.
  • Fresh-server bootstrap hardening

    • Makes init-mail.sh and init-cloud.sh fail fast on missing required env values.
    • Uses stable repo-root-relative paths so the scripts can be run from a clean checkout without depending on caller cwd quirks.
    • Creates expected runtime directories up front for mail and Nextcloud volumes.
  • Mail storage initialization

    • Makes S3-backed mail storage opt-in and explicit.
    • Verifies s3fs mounts before continuing, and surfaces mount errors instead of silently proceeding.
    • Clarifies the local-storage path when S3 bootstrap is not requested.
  • Nextcloud config generation

    • Replaces ad-hoc sed patching of an existing Nextcloud config with generation of a dedicated hermes.config.php from template values.
    • Adds overwrite/trusted proxy settings needed for Traefik path-prefix deployment and fresh installs.
    • Removes deprecated external_links usage from the cloud compose definition.
  • Environment and operator docs

    • Adds the missing HERMES_MODEL_CLOUD_MARIA_IP template entry required by the model/cloud topology.
    • Documents MUST-NOT-BE-EMPTY variables across common, mail, cloud, ingress, and model env files.
    • Adds concise startup, k3s generation, and troubleshooting guidance to the README.

Example of the generated Nextcloud bootstrap config shape:

$CONFIG = array (
  'htaccess.RewriteBase' => '/cloud',
  'overwrite.cli.url' => 'https://mail.example.org/cloud',
  'overwritehost' => 'mail.example.org',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/cloud',
  'redis' => [
     'host' => 'hermes-model-redis',
     'port' => 6379,
  ],
  'trusted_proxies' => array (
    0 => '10.42.0.0/16',
  ),
);

Copilot AI and others added 6 commits May 20, 2026 07:39
Agent-Logs-Url: https://github.com/dupipcom/hermes/sessions/3a0fdde5-6750-427d-a9b3-da641617614c

Co-authored-by: angeloreale <12191809+angeloreale@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dupipcom/hermes/sessions/3a0fdde5-6750-427d-a9b3-da641617614c

Co-authored-by: angeloreale <12191809+angeloreale@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dupipcom/hermes/sessions/3a0fdde5-6750-427d-a9b3-da641617614c

Co-authored-by: angeloreale <12191809+angeloreale@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dupipcom/hermes/sessions/3a0fdde5-6750-427d-a9b3-da641617614c

Co-authored-by: angeloreale <12191809+angeloreale@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dupipcom/hermes/sessions/3a0fdde5-6750-427d-a9b3-da641617614c

Co-authored-by: angeloreale <12191809+angeloreale@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dupipcom/hermes/sessions/3a0fdde5-6750-427d-a9b3-da641617614c

Co-authored-by: angeloreale <12191809+angeloreale@users.noreply.github.com>
Copilot AI changed the title [WIP] Finalize mail server implementation for k3s with traefik Finalize mail and Nextcloud bootstrap for Traefik/k3s deployment May 20, 2026
Copilot AI requested a review from angeloreale May 20, 2026 07:47
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.

Finalize Mail Server Implementation for k3s/Traefik with Out-of-the-Box Scripts & Compose

2 participants