[PR #999] [MERGED] fix(logto): fix postgres role error and update to current version #16307

Closed
opened 2026-07-14 23:18:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/999
Author: @Siumauricio
Created: 7/14/2026
Status: Merged
Merged: 7/14/2026
Merged by: @Siumauricio

Base: canaryHead: fix/logto-update


📝 Commits (1)

  • 7ed8450 fix(logto): fix postgres role error and update to 1.41.0

📊 Changes

3 files changed (+8 additions, -12 deletions)

View changed files

📝 blueprints/logto/docker-compose.yml (+5 -9)
📝 blueprints/logto/meta.json (+1 -1)
📝 blueprints/logto/template.toml (+2 -2)

📄 Description

Problem

Issue #130 reports the Logto template logs FATAL: role "postgres" does not exist and ships an outdated version.

Root cause

The upstream Logto compose uses POSTGRES_USER: postgres, so its bare pg_isready healthcheck works there. Our template overrides the user to logto but kept the bare healthcheck, so every probe (running as OS user postgres due to user: postgres) tried to connect as the non-existent postgres role, spamming the FATAL error on every healthcheck interval.

Changes

  • Healthcheck: pg_isready -U logto -d logto so it probes the actual role/database; also set POSTGRES_DB: logto explicitly. No more FATAL log spam.
  • Version: ghcr.io/logto-io/logto 1.27.0 → 1.41.0 (current latest release), meta.json updated.
  • Endpoint fix: LOGTO_ENDPOINT was pointing at the admin domain; it now points at the main domain (admin console stays on ADMIN_ENDPOINT).
  • Conventions: generated password uses ${password:32}, removed the ports: entries that published ephemeral host ports (Traefik routes over the docker network), removed user: postgres, added restart: unless-stopped.

Verification (deployed on a Dokploy instance)

  • Deploy finished done in ~120s, both containers running, postgres reports healthy (healthcheck passing with the logto role — the source of the FATAL spam is gone).
  • Core endpoint (app:3001): / → HTTP 200/302 as expected, /api/status204 (Logto health OK).
  • Admin console (app:3002): /console200, redirects to /console/welcome (fresh-install onboarding), confirming TRUST_PROXY_HEADER/endpoint config works behind the proxy.
  • node build-scripts/generate-meta.js --check → 476 templates validated.

Closes #130

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/999 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@Siumauricio](https://github.com/Siumauricio) **Base:** `canary` ← **Head:** `fix/logto-update` --- ### 📝 Commits (1) - [`7ed8450`](https://github.com/Dokploy/templates/commit/7ed8450cf8fc52b5af1dcf5f44499da134e9c202) fix(logto): fix postgres role error and update to 1.41.0 ### 📊 Changes **3 files changed** (+8 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `blueprints/logto/docker-compose.yml` (+5 -9) 📝 `blueprints/logto/meta.json` (+1 -1) 📝 `blueprints/logto/template.toml` (+2 -2) </details> ### 📄 Description ## Problem Issue #130 reports the Logto template logs `FATAL: role "postgres" does not exist` and ships an outdated version. ## Root cause The upstream Logto compose uses `POSTGRES_USER: postgres`, so its bare `pg_isready` healthcheck works there. Our template overrides the user to `logto` but kept the bare healthcheck, so every probe (running as OS user `postgres` due to `user: postgres`) tried to connect as the non-existent `postgres` role, spamming the FATAL error on every healthcheck interval. ## Changes - **Healthcheck**: `pg_isready -U logto -d logto` so it probes the actual role/database; also set `POSTGRES_DB: logto` explicitly. No more FATAL log spam. - **Version**: `ghcr.io/logto-io/logto` 1.27.0 → **1.41.0** (current latest release), `meta.json` updated. - **Endpoint fix**: `LOGTO_ENDPOINT` was pointing at the *admin* domain; it now points at the main domain (admin console stays on `ADMIN_ENDPOINT`). - **Conventions**: generated password uses `${password:32}`, removed the `ports:` entries that published ephemeral host ports (Traefik routes over the docker network), removed `user: postgres`, added `restart: unless-stopped`. ## Verification (deployed on a Dokploy instance) - Deploy finished `done` in ~120s, both containers running, postgres reports **healthy** (healthcheck passing with the `logto` role — the source of the FATAL spam is gone). - Core endpoint (`app:3001`): `/` → HTTP 200/302 as expected, `/api/status` → **204** (Logto health OK). - Admin console (`app:3002`): `/console` → **200**, redirects to `/console/welcome` (fresh-install onboarding), confirming `TRUST_PROXY_HEADER`/endpoint config works behind the proxy. - `node build-scripts/generate-meta.js --check` → 476 templates validated. Closes #130 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:18:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16307