Skip to content

Add PostgreSQL and Adminer, move databases to new group - #232

Merged
bubacoder merged 1 commit into
mainfrom
feature/postgresql
Nov 29, 2025
Merged

Add PostgreSQL and Adminer, move databases to new group#232
bubacoder merged 1 commit into
mainfrom
feature/postgresql

Conversation

@bubacoder

@bubacoder bubacoder commented Nov 26, 2025

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added PostgreSQL service and Adminer web admin interface with health checks and networking for easy access.
    • Introduced a proxy network to route services.
  • Configuration

    • Added PostgreSQL and Adminer environment variables and adjusted a Supabase Postgres port.
    • Grouped database services under a unified storage/databases section.
    • Added cloud accounts env stub (GitHub API token) and formatting tweaks.
  • Documentation

    • Added detailed deployment guides for PostgreSQL and Adminer.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Adds PostgreSQL and Adminer service configurations, environment variables, service-group updates, and documentation; includes Docker Compose service files, Traefik labels, healthchecks, volumes, and example env changes.

Changes

Cohort / File(s) Summary
Environment templates
config-example/docker/myhost/.env, config-example/docker/myhost/.env.supabase, config-example/docker/.env
Inserted PostgreSQL env vars (POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB) and Adminer vars (ADMINER_DEFAULT_SERVER, ADMINER_DESIGN, ADMINER_PLUGINS) into host .env; changed SUPABASE_POSTGRES_PORT from 5432 to 5434 in .env.supabase; adjusted local accounts header and added GITHUB_API_TOKEN in root .env.
Orchestration manifest
config-example/docker/myhost/services.yaml
Created a new database subgroup under storage and added entries for adminer, couchdb, mssql-server, and postgresql with state: up.
Docker Compose services
docker/database/adminer.yaml, docker/database/postgresql.yaml
Added Adminer service (adminer:5.4.1-standalone) and PostgreSQL service (postgres:18.1-trixie) compose configs with environment, volumes, healthcheck (postgres), Traefik labels, external proxy network, and a postgres-data volume.
Documentation
docs/PRPs/containers/adminer.md, docs/PRPs/containers/postgresql.md
New PRP docs describing Adminer and PostgreSQL container usage, examples (Compose / run), env vars, volumes, init scripts, security notes, supported versions, and best practices.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User as User (browser)
participant Traefik as Traefik (reverse proxy)
participant Adminer as Adminer container
participant Postgres as PostgreSQL container
Note over User,Traefik: HTTP request to adminer.${MYDOMAIN}
User->>Traefik: GET / (adminer.${MYDOMAIN})
Traefik->>Adminer: Route HTTP to Adminer (label-based)
Adminer->>Postgres: Connect (TCP 5432, env ADMINER_DEFAULT_SERVER or explicit host)
Postgres-->>Adminer: Authenticate / respond to SQL queries
Adminer-->>Traefik: HTTP response
Traefik-->>User: Response delivered

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to Traefik label correctness and matching domain variables in adminer.yaml and postgresql.yaml.
  • Verify Postgres healthcheck and exposed port vs. .env.supabase port change.
  • Confirm volume paths and init script mounting in postgresql.yaml.
  • Check consistency of newly added env variable names across templates and docs.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding PostgreSQL and Adminer services, and reorganizing databases into a new group.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/postgresql

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 and usage tips.

@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: 0

🧹 Nitpick comments (4)
config-example/docker/myhost/.env.supabase (1)

53-53: Add quotes around numeric port value for linting compliance.

The numeric port value should be quoted to satisfy dotenv-linter's ValueWithoutQuotes rule. While other port values in this file follow the same unquoted pattern, standardizing on quoted values improves linting compliance and consistency.

Apply this diff:

-SUPABASE_POSTGRES_PORT=5434 # Default: 5432
+SUPABASE_POSTGRES_PORT="5434" # Default: 5432
config-example/docker/myhost/.env (1)

111-114: Reorder PostgreSQL environment variables alphabetically to satisfy linter.

The dotenv-linter suggests alphabetical ordering: POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_USER. While the current logical grouping is reasonable, standardizing on alphabetical order improves consistency with linting expectations.

Apply this diff:

 ### PostgreSQL configuration
-POSTGRES_USER="postgres"
-POSTGRES_PASSWORD="use-some-very-secure-value-here"
-POSTGRES_DB="postgres"
+POSTGRES_DB="postgres"
+POSTGRES_PASSWORD="use-some-very-secure-value-here"
+POSTGRES_USER="postgres"
docs/PRPs/containers/adminer.md (1)

4-6: Wrap bare URLs in angle brackets for markdown compliance.

Markdown linting requires bare URLs to be wrapped in angle brackets (<url>) or formatted as proper markdown links. This applies to lines 4, 5, and 6.

Apply this diff:

 Application name: Adminer
-Homepage: https://www.adminer.org
-GitHub page: https://github.com/vrana/adminer
-Install instructions URL: https://hub.docker.com/_/adminer/
+Homepage: <https://www.adminer.org>
+GitHub page: <https://github.com/vrana/adminer>
+Install instructions URL: <https://hub.docker.com/_/adminer/>
docs/PRPs/containers/postgresql.md (1)

10-11: Consider standardizing hyphenation of compound adjectives.

For grammatical consistency, consider using "open-source" (hyphenated) when modifying nouns as a compound adjective. This affects lines 10, 11 (two occurrences).

Apply this diff:

-Short description: Powerful open source object-relational database system
-Long description: PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. It is positioned as "The world's most advanced open source database".
+Short description: Powerful open-source object-relational database system
+Long description: PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. It is positioned as "The world's most advanced open-source database".
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d1aeb0 and 15b644a.

📒 Files selected for processing (7)
  • config-example/docker/myhost/.env (1 hunks)
  • config-example/docker/myhost/.env.supabase (1 hunks)
  • config-example/docker/myhost/services.yaml (1 hunks)
  • docker/database/adminer.yaml (1 hunks)
  • docker/database/postgresql.yaml (1 hunks)
  • docs/PRPs/containers/adminer.md (1 hunks)
  • docs/PRPs/containers/postgresql.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

YAML files must pass YAML linting and validation

Files:

  • docker/database/postgresql.yaml
  • docker/database/adminer.yaml
  • config-example/docker/myhost/services.yaml
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: bubacoder/infra PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T20:10:59.652Z
Learning: Use Docker and Docker Compose for containerized services deployment
📚 Learning: 2025-11-26T20:10:59.652Z
Learnt from: CR
Repo: bubacoder/infra PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T20:10:59.652Z
Learning: Use Docker and Docker Compose for containerized services deployment

Applied to files:

  • docs/PRPs/containers/adminer.md
🪛 dotenv-linter (4.0.0)
config-example/docker/myhost/.env

[warning] 112-112: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 113-113: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 113-113: [UnorderedKey] The POSTGRES_PASSWORD key should go before the POSTGRES_USER key

(UnorderedKey)


[warning] 114-114: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 114-114: [UnorderedKey] The POSTGRES_DB key should go before the POSTGRES_PASSWORD key

(UnorderedKey)


[warning] 118-118: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 120-120: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 122-122: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)

config-example/docker/myhost/.env.supabase

[warning] 53-53: [ValueWithoutQuotes] This value needs to be surrounded in quotes

(ValueWithoutQuotes)

🪛 LanguageTool
docs/PRPs/containers/postgresql.md

[grammar] ~10-~10: Use a hyphen to join words.
Context: ...Storage Short description: Powerful open source object-relational database system...

(QB_NEW_EN_HYPHEN)


[grammar] ~11-~11: Use a hyphen to join words.
Context: ...cription: PostgreSQL is a powerful, open source object-relational database system...

(QB_NEW_EN_HYPHEN)


[grammar] ~11-~11: Use a hyphen to join words.
Context: ...ioned as "The world's most advanced open source database". ## Container deployme...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
docs/PRPs/containers/adminer.md

4-4: Bare URL used

(MD034, no-bare-urls)


5-5: Bare URL used

(MD034, no-bare-urls)


6-6: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (8)
config-example/docker/myhost/services.yaml (1)

94-102: ✓ New database group structure is well-organized.

The new database group logically consolidates database services (adminer, couchdb, mssql-server, postgresql) under storage, improving configuration clarity and alignment with the PR objectives.

config-example/docker/myhost/.env (1)

116-122: ✓ Adminer configuration variables are well-structured.

The environment variables follow the optional-default pattern (${VAR:-}) consistent with the configuration approach in adminer.yaml. The comments clarifying each variable's purpose are helpful.

docs/PRPs/containers/adminer.md (1)

1-135: ✓ Comprehensive and security-focused documentation.

The documentation provides excellent coverage: clear Docker Compose and Docker Run examples, security considerations (access control, network isolation, credential management), supported architectures, database compatibility, and a production-ready deployment example with Traefik and Authelia integration. This aligns well with the actual docker/database/adminer.yaml configuration and supports operators deploying these services.

docker/database/postgresql.yaml (3)

17-27: ✓ Well-configured PostgreSQL service with secure defaults.

The environment variables use appropriate defaults via expansion (${POSTGRES_PASSWORD} requires explicit setting while others have safe defaults). The shm_size: 128mb is properly configured for performance.


35-39: ✓ Healthcheck is properly implemented.

The pg_isready healthcheck with 10s interval, 5s timeout, and 5 retries provides good operational visibility and allows orchestrators to detect database availability issues.


1-52: YAML validation passed with minor line-length warnings.

The postgresql.yaml file contains valid YAML syntax and meets the coding guideline requirement for YAML linting validation. However, yamllint identified two line-length warnings:

  • Line 1: 83 characters (comment exceeds 80-character limit by 3)
  • Line 45: 84 characters (description label exceeds 80-character limit by 4)

These are style warnings, not structural errors. The file is fully functional and deployable. If stricter line-length compliance is desired, consider reformatting lines 1 and 45 to stay within the 80-character limit.

docs/PRPs/containers/postgresql.md (1)

1-230: ✓ Comprehensive, technically accurate, and production-ready documentation.

This documentation provides excellent coverage for PostgreSQL deployment: clear distinction between PostgreSQL versions (17 vs. 18+) for volume mounting, detailed environment variable reference, Docker Secrets support for production, initialization script patterns with proper error handling, security considerations, best practices, and health check examples. The content aligns perfectly with the docker/database/postgresql.yaml service configuration and supports operators in deploying and managing PostgreSQL containers securely.

docker/database/adminer.yaml (1)

1-39: YAML validation passed and Traefik middleware verified.

The YAML syntax is valid and the referenced middleware localaccess-sso@file is properly defined in docker/security/traefik/dynamic/middlewares.yml (chains local-ip-allowlist and authelia). No issues found.

@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: 1

🧹 Nitpick comments (2)
config-example/docker/myhost/.env.supabase (1)

53-53: Add quotes around port number for dotenv consistency.

The value should be quoted to align with dotenv linting standards, even for numeric values.

-SUPABASE_POSTGRES_PORT=5434 # Default: 5432
+SUPABASE_POSTGRES_PORT="5434" # Default: 5432
config-example/docker/myhost/.env (1)

111-123: Reorder PostgreSQL variables for alphabetical consistency.

The dotenv linter flags that POSTGRES_DB, POSTGRES_PASSWORD, and POSTGRES_USER should be ordered alphabetically for consistency with project conventions. This is a minor stylistic improvement that aids tooling and readability.

 ### PostgreSQL configuration
-POSTGRES_USER="postgres"
-POSTGRES_PASSWORD="use-some-very-secure-value-here"
-POSTGRES_DB="postgres"
+POSTGRES_DB="postgres"
+POSTGRES_PASSWORD="use-some-very-secure-value-here"
+POSTGRES_USER="postgres"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15b644a and a41f04c.

📒 Files selected for processing (8)
  • config-example/docker/.env (2 hunks)
  • config-example/docker/myhost/.env (1 hunks)
  • config-example/docker/myhost/.env.supabase (1 hunks)
  • config-example/docker/myhost/services.yaml (1 hunks)
  • docker/database/adminer.yaml (1 hunks)
  • docker/database/postgresql.yaml (1 hunks)
  • docs/PRPs/containers/adminer.md (1 hunks)
  • docs/PRPs/containers/postgresql.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • docker/database/adminer.yaml
  • docker/database/postgresql.yaml
  • config-example/docker/myhost/services.yaml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: bubacoder/infra PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T20:10:59.672Z
Learning: Use Docker and Docker Compose for containerized services deployment
📚 Learning: 2025-11-26T20:10:59.672Z
Learnt from: CR
Repo: bubacoder/infra PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T20:10:59.672Z
Learning: Use Docker and Docker Compose for containerized services deployment

Applied to files:

  • docs/PRPs/containers/adminer.md
🪛 dotenv-linter (4.0.0)
config-example/docker/.env

[warning] 32-32: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)

config-example/docker/myhost/.env

[warning] 112-112: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 113-113: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 113-113: [UnorderedKey] The POSTGRES_PASSWORD key should go before the POSTGRES_USER key

(UnorderedKey)


[warning] 114-114: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 114-114: [UnorderedKey] The POSTGRES_DB key should go before the POSTGRES_PASSWORD key

(UnorderedKey)


[warning] 118-118: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 120-120: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 122-122: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)

config-example/docker/myhost/.env.supabase

[warning] 53-53: [ValueWithoutQuotes] This value needs to be surrounded in quotes

(ValueWithoutQuotes)

🪛 LanguageTool
docs/PRPs/containers/postgresql.md

[grammar] ~10-~10: Use a hyphen to join words.
Context: ...Storage Short description: Powerful open source object-relational database system...

(QB_NEW_EN_HYPHEN)


[grammar] ~11-~11: Use a hyphen to join words.
Context: ...cription: PostgreSQL is a powerful, open source object-relational database system...

(QB_NEW_EN_HYPHEN)


[grammar] ~11-~11: Use a hyphen to join words.
Context: ...ioned as "The world's most advanced open source database". ## Container deployme...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)
docs/PRPs/containers/postgresql.md

4-4: Bare URL used

(MD034, no-bare-urls)


5-5: Bare URL used

(MD034, no-bare-urls)


6-6: Bare URL used

(MD034, no-bare-urls)

docs/PRPs/containers/adminer.md

4-4: Bare URL used

(MD034, no-bare-urls)


5-5: Bare URL used

(MD034, no-bare-urls)


6-6: Bare URL used

(MD034, no-bare-urls)


75-75: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (4)
config-example/docker/.env (2)

19-19: Good: Improved section header formatting.

The Markdown-style header improves file readability and visual hierarchy. Consistent formatting across local and cloud account sections.


29-32: Good: Clear organization of cloud service credentials.

Separating cloud account tokens from local account credentials improves maintainability. The GitHub token generation link is helpful for users.

docs/PRPs/containers/adminer.md (1)

1-135: Comprehensive and well-structured Adminer documentation.

Excellent documentation covering deployment patterns, security considerations, supported databases, and production-ready examples. The emphasis on authentication middleware (Traefik + Authelia) aligns well with your infrastructure model. Clear guidance on network isolation and credential management.

The bare URL warnings from markdownlint are false positives in documentation context—external links are necessary and appropriate here.

docs/PRPs/containers/postgresql.md (1)

1-230: Thorough PostgreSQL deployment documentation with production best practices.

Excellent comprehensive guide covering all essential aspects: environment variables, volume management (with critical PostgreSQL 17 vs 18+ distinction), Docker Secrets for secure credential handling, initialization scripts, database configuration, and security considerations. The health check example and resource limitation guidance strengthen production readiness.

Minor grammar suggestions (e.g., "open-source" vs "open source") are stylistic preferences and don't impact clarity.

Comment on lines +1 to +135
## Base information for PostgreSQL application

Application name: PostgreSQL
Homepage: https://www.postgresql.org/
GitHub page: https://github.com/docker-library/postgres (Docker official image repository)
Install instructions URL: https://hub.docker.com/_/postgres
Category: storage
Dashboard Icon: postgresql.png
Dashboard Group: Storage
Short description: Powerful open source object-relational database system
Long description: PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. It is positioned as "The world's most advanced open source database".

## Container deployment

### Docker Compose Example

The official documentation provides this basic example with Adminer as a database management interface:

```yaml
services:
db:
image: postgres
restart: always
shm_size: 128mb
environment:
POSTGRES_PASSWORD: example

adminer:
image: adminer
restart: always
ports:
- 8080:8080
```

**Important**: Set `shm_size: 128mb` to optimize performance and avoid shared memory issues.

### Docker Run Command

Basic startup command:
```bash
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
```

### Essential Environment Variables

| Variable | Required | Purpose |
|----------|----------|---------|
| `POSTGRES_PASSWORD` | **Yes** | Sets superuser password; must not be empty |
| `POSTGRES_USER` | No | Creates named superuser (defaults to `postgres`) |
| `POSTGRES_DB` | No | Specifies initial database name |
| `POSTGRES_INITDB_ARGS` | No | Passes arguments to `initdb` (e.g., `--data-checksums`) |
| `POSTGRES_INITDB_WALDIR` | No | Designates transaction log directory |
| `POSTGRES_HOST_AUTH_METHOD` | No | Controls authentication method (default: `scram-sha-256`) |
| `PGDATA` | No | PostgreSQL 18+: `/var/lib/postgresql/18/docker` |

### Volume Configuration

**Critical for data persistence:**

- **PostgreSQL 17 and below**: Mount volumes at `/var/lib/postgresql/data` (not at `/var/lib/postgresql`)
- **PostgreSQL 18+**: Mount at `/var/lib/postgresql`

The documentation emphasizes: "Mount the data volume at `/var/lib/postgresql/data` and not at `/var/lib/postgresql` because mounts at the latter path will not persist database data when the container is re-created."

Example with named volume:
```yaml
services:
db:
image: postgres:17
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: example

volumes:
postgres-data:
```

### Docker Secrets Support

For secure password handling in production:

```bash
docker run --name some-postgres \
-e POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd \
-d postgres
```

Supported variables with `_FILE` suffix:
- `POSTGRES_PASSWORD_FILE`
- `POSTGRES_USER_FILE`
- `POSTGRES_DB_FILE`
- `POSTGRES_INITDB_ARGS_FILE`

### Initialization Scripts

PostgreSQL supports automatic database initialization through scripts placed in `/docker-entrypoint-initdb.d/`:

- `*.sql` files execute as the PostgreSQL superuser
- `*.sh` executable scripts run with superuser privileges
- Non-executable `*.sh` scripts are sourced

**Important limitation**: Scripts only run if you start the container with an empty data directory.

Example initialization script:
```bash
#!/usr/bin/env bash
set -e

psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" \
--dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER docker;
CREATE DATABASE docker;
GRANT ALL PRIVILEGES ON DATABASE docker TO docker;
EOSQL
```

### Database Configuration

#### Via Configuration File

```bash
docker run -d --name some-postgres \
-v "$PWD/my-postgres.conf":/etc/postgresql/postgresql.conf \
-e POSTGRES_PASSWORD=mysecretpassword \
postgres -c 'config_file=/etc/postgresql/postgresql.conf'
```

#### Via Command-Line Arguments

```bash
docker run -d --name some-postgres \
-e POSTGRES_PASSWORD=mysecretpassword \
postgres -c shared_buffers=256MB -c max_connections=200
```

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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Find all YAML files in docker/database directory
echo "=== Looking for service files ==="
find docker -name "*.yaml" -o -name "*.yml" 2>/dev/null | head -20

# Check if docker/database directory exists
echo -e "\n=== Checking docker/database directory structure ==="
ls -la docker/database/ 2>/dev/null || echo "Directory not found, searching for database-related files..."

# Search more broadly for postgresql and adminer related files
echo -e "\n=== Searching for postgresql and adminer files ==="
find docker -type f \( -name "*postgresql*" -o -name "*adminer*" \) 2>/dev/null

Repository: bubacoder/infra

Length of output: 1253


🏁 Script executed:

#!/bin/bash

echo "=== PostgreSQL service definition ==="
cat docker/database/postgresql.yaml

echo -e "\n=== Adminer service definition ==="
cat docker/database/adminer.yaml

Repository: bubacoder/infra

Length of output: 3200


Documentation examples do not reflect actual service implementations; update Docker Compose examples to match production configuration.

The documented Docker Compose examples (lines 19-33 and 48-59) show basic standalone services without Traefik configuration, healthchecks, or network setup, while the actual docker/database/postgresql.yaml and docker/database/adminer.yaml implementations include:

  • Traefik labels and external proxy network (Adminer has traefik.enable: true with localaccess-sso@file middleware)
  • Healthchecks for PostgreSQL (using pg_isready)
  • Proper volume mounts for PostgreSQL 18 at /var/lib/postgresql (not /var/lib/postgresql/data)
  • Initialization scripts mounted from ./postgresql/initdb
  • Image pinning (postgres:18.1-trixie, adminer:5.4.1-standalone)

The documentation's basic example is useful for getting started, but should be updated to reflect the actual production setup or clearly separated as a "minimal example" vs. the "production configuration" shown in the service files. Include the Traefik labels, healthcheck configuration, and proper network setup in the documented examples.

🧰 Tools
🪛 LanguageTool

[grammar] ~10-~10: Use a hyphen to join words.
Context: ...Storage Short description: Powerful open source object-relational database system...

(QB_NEW_EN_HYPHEN)


[grammar] ~11-~11: Use a hyphen to join words.
Context: ...cription: PostgreSQL is a powerful, open source object-relational database system...

(QB_NEW_EN_HYPHEN)


[grammar] ~11-~11: Use a hyphen to join words.
Context: ...ioned as "The world's most advanced open source database". ## Container deployme...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.18.1)

4-4: Bare URL used

(MD034, no-bare-urls)


5-5: Bare URL used

(MD034, no-bare-urls)


6-6: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In docs/PRPs/containers/postgresql.md (lines 1-135) the Docker Compose examples
are minimal and do not match the actual production service implementations;
update the examples to either (A) replace the minimal examples with a
production-ready Compose snippet that includes Traefik labels, external proxy
network attachment, healthcheck (pg_isready), correct volume mount path for
PostgreSQL 18 (/var/lib/postgresql), mounts for ./postgresql/initdb, and pinned
image tags (e.g., postgres:18.1-trixie, adminer:5.4.1-standalone), or (B) keep
the minimal example but explicitly separate and label it as "Minimal example"
and add a new "Production example" section that contains the full Compose
configuration with the listed Traefik, network, healthcheck, init scripts,
volume and image-pin details so docs match docker/database/postgresql.yaml and
docker/database/adminer.yaml.

@bubacoder
bubacoder merged commit 8ec3833 into main Nov 29, 2025
4 checks passed
@bubacoder
bubacoder deleted the feature/postgresql branch November 29, 2025 14:36
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.

1 participant