Skip to content

Update the docker deployment guide documentation - #4277

Open
Osara-B wants to merge 1 commit into
thunder-id:mainfrom
Osara-B:docker-docs
Open

Update the docker deployment guide documentation#4277
Osara-B wants to merge 1 commit into
thunder-id:mainfrom
Osara-B:docker-docs

Conversation

@Osara-B

@Osara-B Osara-B commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Purpose

The Docker deployment guides contained several errors that caused documented commands to fail silently or produce a non-working deployment. All fixes were reproduced against ghcr.io/thunder-id/thunderid:latest.
Fixes #4228

Affected files:

  • docs/content/deployment/deployment-paths/docker.mdx
  • docs/content/deployment/deployment-paths/docker-production.mdx
  • docs/content/deployment/production-guidelines.mdx
  • install/local-development/docker-compose.yml

Approach

Fixed the following issues:

  1. Incorrect container paths. Several docker run / Compose examples mounted into /opt/thunder/..., but the container's application directory is /opt/thunderid. Corrected the data volume, security-directory, and deployment.yaml mounts in docker-production.mdx, and the TLS command mounts (deployment.yaml, server.cert, server.key) in production-guidelines.mdx.

  2. Security directory mounted to the wrong subpath. docker-production.mdx mounted to config/resources/security, but setup writes the TLS, JWT, and encryption keys to config/certs. Corrected the target to /opt/thunderid/config/certs.

  3. Identical "Avoid" and "Prefer" image-pin examples. In "Pin the Image Version", both examples showed :latest. The "Prefer" example now shows a pinned tag (ghcr.io/thunder-id/thunderid:<version>).

  4. Health check hit a non-existent endpoint. The Compose health check used /health The server registers /health/liveness and /health/readiness. Updated to /health/liveness.

  5. Customize section pointed to a config that cannot work in Docker. The "Customize the Configuration" section pointed readers to the default deployment.yaml (hostname: "localhost", no public_url), which the image only works with because the Dockerfile patches those values at build time. A mounted file bypasses that patch. Replaced the pointer with a Docker-ready inline configuration (hostname: "0.0.0.0" and a public_url).

  6. PostgreSQL port quoted as a string. The Postgres blocks in production-guidelines.mdx used port: "5432" (string); the schema expects an integer.

  7. Removed the "Run with Docker Compose" section from docker.mdx, since its example could not produce a working PostgreSQL deployment as written.

  8. Pinned the PostgreSQL version in install/local-development/docker-compose.yml. The volume is mounted at postgres_data:/var/lib/postgresql/data, but PostgreSQL 18 and later changed the data directory, so the untagged postgres image crash-loops. Pinned to postgres:16-alpine to keep the data directory consistent with the mount.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation

    • Updated Docker production guidance for more reproducible, hardened deployments (versioned image guidance, improved persistent volume mounts for database/TLS/secrets, corrected reverse-proxy file mount, and more specific health check endpoint).
    • Reworked Docker deployment docs with a ready-to-use deployment.yaml example, simplified access instructions, and clarified requirements for external PostgreSQL.
    • Adjusted production example settings (PostgreSQL port formatting) and aligned certificate/secret mounts to the /opt/thunderid/... layout.
  • Chores

    • Pinned local development PostgreSQL to 16-alpine for consistent setup.

Copilot AI review requested due to automatic review settings July 23, 2026 06:53
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e3caacb7-66ae-4161-9d48-7dcc815e6542

📥 Commits

Reviewing files that changed from the base of the PR and between 12bfd00 and 762cc74.

📒 Files selected for processing (4)
  • docs/content/deployment/deployment-paths/docker-production.mdx
  • docs/content/deployment/deployment-paths/docker.mdx
  • docs/content/deployment/production-guidelines.mdx
  • install/local-development/docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (4)
  • install/local-development/docker-compose.yml
  • docs/content/deployment/deployment-paths/docker-production.mdx
  • docs/content/deployment/production-guidelines.mdx
  • docs/content/deployment/deployment-paths/docker.mdx

📝 Walkthrough

Walkthrough

Docker deployment documentation now uses corrected container paths, a Docker-ready configuration example, the liveness health endpoint, numeric PostgreSQL ports, persistent certificate and secret volumes, and a pinned local PostgreSQL image.

Changes

Docker deployment documentation

Layer / File(s) Summary
Docker guide configuration and access flow
docs/content/deployment/deployment-paths/docker.mdx
Prerequisite checks, Docker configuration examples, access instructions, and external PostgreSQL requirements are updated.
Production mount and health-check paths
docs/content/deployment/deployment-paths/docker-production.mdx, docs/content/deployment/production-guidelines.mdx
Docker image, volume, certificate, deployment file, secret, environment guidance, and health-check examples use the updated paths and endpoint.
Database configuration examples
docs/content/deployment/production-guidelines.mdx, install/local-development/docker-compose.yml
PostgreSQL ports use numeric values, and the local PostgreSQL service uses postgres:16-alpine.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: rajithacharith

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely summarizes the main change: updating Docker deployment documentation.
Description check ✅ Passed The PR description includes Purpose, Approach, Related Issues, Related PRs, checklist, and security sections, matching the template.
Linked Issues check ✅ Passed The changes address the listed requirements in #4228 across the docs and compose file.
Out of Scope Changes check ✅ Passed I didn't see unrelated changes; the edits stay within the Docker deployment documentation and compose fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
install/local-development/docker-compose.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

docs/content/deployment/deployment-paths/docker-production.mdx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

docs/content/deployment/deployment-paths/docker.mdx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

docs/content/deployment/production-guidelines.mdx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects multiple inaccuracies in the Docker deployment documentation for ThunderID so that the documented commands and mounts match the actual container filesystem and runtime requirements, plus it stabilizes local dev PostgreSQL by pinning a compatible image tag.

Changes:

  • Fixes Docker/Compose mount paths and health check endpoints to match the container layout and available routes.
  • Replaces/updates configuration guidance to include a Docker-ready deployment.yaml example (bind address + server.public_url) and removes a non-working Compose section from the Docker guide.
  • Pins local-development PostgreSQL to postgres:16-alpine to avoid data-directory incompatibilities with newer major versions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
install/local-development/docker-compose.yml Pins PostgreSQL image tag for stable local dev volume layout.
docs/content/deployment/production-guidelines.mdx Fixes Postgres port type and updates Docker TLS/certs mounting guidance.
docs/content/deployment/deployment-paths/docker.mdx Updates Docker guide: removes non-working Compose section and provides Docker-ready config example.
docs/content/deployment/deployment-paths/docker-production.mdx Corrects production Docker recommendations: mounts, pinned image example, and healthcheck endpoint.

Comment thread docs/content/deployment/production-guidelines.mdx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/content/deployment/deployment-paths/docker-production.mdx (1)

1-1: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Stale :latest tags contradict this PR's own pinning guidance. docker-production.mdx adds a "Pin the Image Version" section instructing readers to always use an explicit release tag instead of latest, but two examples elsewhere in the same doc set still hardcode :latest, undermining that guidance.

  • docs/content/deployment/deployment-paths/docker-production.mdx#L61-66: replace ghcr.io/thunder-id/thunderid:latest in the "Persist Data with Named Volumes" example with the same <version> placeholder used in the pinning section.
  • docs/content/deployment/production-guidelines.mdx#L134-146: replace ghcr.io/thunder-id/thunderid:latest in the cert-replacement docker run example with a pinned/placeholder version.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/deployment/deployment-paths/docker-production.mdx` at line 1,
Replace the hardcoded :latest image tags in the “Persist Data with Named
Volumes” example and the cert-replacement docker run example with the
established <version> placeholder, keeping both examples consistent with the
“Pin the Image Version” guidance.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/content/deployment/deployment-paths/docker-production.mdx`:
- Around line 61-66: Update the Docker run example in the deployment
documentation to use a pinned ThunderID image version instead of the :latest
tag. Keep the command structure unchanged and align the image reference with the
version-pinning guidance and the corresponding production-guidelines example.
- Around line 68-71: Reconcile the security-directory example under “Persist
Data with Named Volumes” with the documented `thunderid-certs` named-volume
workflow: replace the host bind mount in the deployment instructions with the
established named-volume usage, or explicitly explain the intentional deviation
and its implications. Keep the TLS certificate and encryption-key persistence
guidance consistent with the related Docker documentation.

In `@docs/content/deployment/deployment-paths/docker.mdx`:
- Around line 154-163: The Docker-ready SMTP configuration must not use
127.0.0.1 as the default host. Update the smtp.host example to a
container-reachable value such as host.docker.internal and document the required
Linux --add-host option, or clearly mark the host as a user-replaceable
placeholder consistent with the other deployment credentials.

In `@docs/content/deployment/production-guidelines.mdx`:
- Around line 134-146: Update the Docker image reference in the production
deployment example to use the documented pinned release or version variable
instead of the mutable `:latest` tag, matching the convention used in
`docker-production.mdx` and the consolidated guidance. Preserve the existing
volume mounts and container paths.

---

Outside diff comments:
In `@docs/content/deployment/deployment-paths/docker-production.mdx`:
- Line 1: Replace the hardcoded :latest image tags in the “Persist Data with
Named Volumes” example and the cert-replacement docker run example with the
established <version> placeholder, keeping both examples consistent with the
“Pin the Image Version” guidance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 006c0703-8d20-4d9f-bec0-f64ab5b3b296

📥 Commits

Reviewing files that changed from the base of the PR and between 88313f8 and 8e6420f.

📒 Files selected for processing (4)
  • docs/content/deployment/deployment-paths/docker-production.mdx
  • docs/content/deployment/deployment-paths/docker.mdx
  • docs/content/deployment/production-guidelines.mdx
  • install/local-development/docker-compose.yml

Comment thread docs/content/deployment/deployment-paths/docker-production.mdx
Comment thread docs/content/deployment/deployment-paths/docker-production.mdx Outdated
Comment thread docs/content/deployment/deployment-paths/docker.mdx
Comment thread docs/content/deployment/production-guidelines.mdx
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI review requested due to automatic review settings July 23, 2026 08:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread docs/content/deployment/deployment-paths/docker-production.mdx Outdated
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.

[Docs] Update the docker deployment guides

2 participants