Skip to content

docs(configuration): quote database passwords and show an external override - #65

Merged
zZebrahz merged 5 commits into
Silo-Server:mainfrom
blurbery:docs/compose-postgres-password
Oct 10, 2026
Merged

zZebrahz merged 5 commits into
Silo-Server:mainfrom
blurbery:docs/compose-postgres-password

Conversation

@blurbery

@blurbery blurbery commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #38

Silo-Server/silo-server#1635 removed the server repository's Docker guide. While working on Silo-Server/silo-server#1049, review turned up two things about the bundled database password that the configuration page doesn't cover, and the guide never did either:

  • Compose expands $ in an unquoted .env value. With POSTGRES_PASSWORD=compose-test$literal the stack renders compose-test, so an existing database's password no longer matches.
  • The bundled stack inserts POSTGRES_PASSWORD into Silo's DATABASE_URL without encoding it, so some characters break the URL.

The "External PostgreSQL and Redis" section also lists what an override must do without showing one.

Approach

On running-a-server/configuration.md:

  • Say to single-quote a password that contains $, that a single-quoted value can't hold a ' or end with a backslash (Compose reads that backslash as escaping the closing quote), and which characters the bundled database URL can't carry. Point to openssl rand -hex 24 as a value with neither problem.
  • Add a working override that removes both bundled services, resets depends_on, and sets external URLs, with a note to percent-encode the password in DATABASE_URL.

This only describes current behaviour. The stricter password requirement in Silo-Server/silo-server#1049 isn't released, so I've left it out. It can be added once that ships.

Validation

I reviewed the source and tested with Docker Compose 5.5.1 on macOS against docker-compose.yml from current silo-server main. Nothing was run on a real device and no containers were started.

  • The override example, extracted from this page, renders with docker compose config and leaves only the silo service.
  • POSTGRES_PASSWORD='pa$word' renders as pa$word, and the unquoted compose-test$literal renders as compose-test.
  • I checked each printable ASCII character in a password against Go's net/url, which pgx uses to parse DATABASE_URL. #, %, /, ?, ", <, >, [, \, ], ^, `, {, | and } break parsing or change the password. @, $ and : are fine.
  • node --test scripts/test-docs-structure.mjs passed (8 tests). I didn't run bun run build locally; the PR build covers it. The change adds no links.

Risks

Docs only. The character list describes Go's URL parsing, so a future server change that encodes the password would make it stricter than needed.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

AI-assisted with Claude Opus. I directed the task and designed the work.

  • Harness: Claude Code desktop app.
  • Tools: Bash, file editing, GitHub CLI (gh), Docker Compose, Go.
  • Model: Claude Opus.
  • Involvement: AI-assisted.

Note

Add password quoting guidance and external database override example to configuration docs

  • Documents that POSTGRES_PASSWORD values containing $ need single quotes in .env, and lists password characters that break the bundled Silo database URL. Recommends openssl rand -hex 24 values.
  • Adds a Docker Compose override example that removes the bundled PostgreSQL and Redis services, sets external DATABASE_URL and REDIS_URL, and disables automatic PostgreSQL tuning. Instructs users to percent-encode reserved characters in EXTERNAL_DB_PASSWORD.
  • All changes are in configuration.md.

Macroscope summarized 9467fad.

…erride

Explain that Compose expands `$` in an unquoted .env value, which characters
the bundled stack's database URL cannot carry, and give a working override
for external PostgreSQL and Redis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a7f9d61d-620b-43ca-9543-c682bb271c1f

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@kody-ai

kody-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@silo-kody

silo-kody Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@zZebrahz
zZebrahz self-requested a review October 3, 2026 04:08
@silo-kody

silo-kody Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 2 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Scope polling setup steps to installable source capabilities
  • Preserve retired documentation URLs with tested redirects

@zZebrahz

Copy link
Copy Markdown
Contributor

Thanks for this. The quoting rule, the character problem, and the override all check out against current main.

I pushed three small commits on top:

  • 1cc506f introduces the character list with "such as", adds \ and |, and says "double quotes", since a single quote is fine in the URL.
  • cffbaf3 links the openssl rand -hex 24 advice to the install guide, which already generates the password that way.
  • 9467fad adds POSTGRES_TUNE: "off" to the override, because the tuning section on the same page says to turn it off for an external database. It also says to set EXTERNAL_DB_PASSWORD in .env.

The wording is otherwise yours.

@zZebrahz
zZebrahz merged commit 3a6fe13 into Silo-Server:main Oct 10, 2026
4 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 9467fadf Deployed Oct 10, 2026 by zZebrahz via teardown #55
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.

2 participants