Compare commits

..
Author SHA1 Message Date
Mauricio SiuandClaude Fable 5 7ed8450cf8 fix(logto): fix postgres role error and update to 1.41.0
The postgres healthcheck ran pg_isready without -U while POSTGRES_USER
was set to logto, so every probe attempted to connect as role
"postgres" and spammed FATAL: role "postgres" does not exist.
Pass -U logto -d logto explicitly and set POSTGRES_DB.

Also fix LOGTO_ENDPOINT pointing at the admin domain instead of the
main domain, update Logto 1.27.0 -> 1.41.0, use ${password:32} for the
generated password, drop the ephemeral host port publishing and add
restart policies.

Closes #130

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:04:17 -06:00
6 changed files with 93 additions and 35 deletions
+46 -13
View File
@@ -1,29 +1,58 @@
services:
db-migration:
depends_on:
db:
condition: service_healthy
image: infisical/infisical:v0.135.0-postgres
environment:
- NODE_ENV=production
- ENCRYPTION_KEY
- AUTH_SECRET
- SITE_URL
- DB_CONNECTION_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- SMTP_HOST
- SMTP_PORT
- SMTP_FROM_NAME
- SMTP_USERNAME
- SMTP_PASSWORD
- SMTP_SECURE=true
command: npm run migration:latest
pull_policy: always
backend:
image: infisical/infisical:v0.162.6
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db-migration:
condition: service_completed_successfully
image: infisical/infisical:v0.135.0-postgres
pull_policy: always
environment:
- NODE_ENV=production
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- AUTH_SECRET=${AUTH_SECRET}
- SITE_URL=${SITE_URL}
- ENCRYPTION_KEY
- AUTH_SECRET
- SITE_URL
- DB_CONNECTION_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_FROM_ADDRESS=${SMTP_FROM_ADDRESS}
- SMTP_FROM_NAME=${SMTP_FROM_NAME}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_HOST
- SMTP_PORT
- SMTP_FROM_NAME
- SMTP_USERNAME
- SMTP_PASSWORD
- SMTP_SECURE=true
redis:
image: redis:7.4.1
env_file: .env
restart: always
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redis_infisical_data:/data
@@ -31,11 +60,12 @@ services:
image: postgres:14-alpine
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
volumes:
- pg_infisical_data:/var/lib/postgresql/data
healthcheck:
test: "pg_isready --username=${POSTGRES_USER} && psql --username=${POSTGRES_USER} --list"
interval: 5s
@@ -45,3 +75,6 @@ services:
volumes:
pg_infisical_data:
redis_infisical_data:
+1 -1
View File
@@ -1,7 +1,7 @@
{
"id": "infisical",
"name": "Infisical",
"version": "0.162.6",
"version": "0.135.0",
"description": "All-in-one platform to securely manage application configuration and secrets across your team and infrastructure.",
"logo": "infisical.jpg",
"links": {
+38 -9
View File
@@ -3,27 +3,56 @@ main_domain = "${domain}"
postgres_password = "${password}"
postgres_user = "infisical"
postgres_db = "infisical"
encryption_key = "${hash:32}"
auth_secret = "${base64:32}"
[config]
env = [
"ENCRYPTION_KEY=${encryption_key}",
"AUTH_SECRET=${auth_secret}",
"ENCRYPTION_KEY=6c1fe4e407b8911c104518103505b218",
"AUTH_SECRET=5lrMXKKWCVocS/uerPsl7V+TX/aaUaI7iDkgl3tSmLE=",
"POSTGRES_PASSWORD=${postgres_password}",
"POSTGRES_USER=${postgres_user}",
"POSTGRES_DB=${postgres_db}",
"SITE_URL=http://${main_domain}",
"SITE_URL=http://${main_domain}:8080",
"SMTP_HOST=",
"SMTP_PORT=587",
"SMTP_FROM_ADDRESS=",
"SMTP_FROM_NAME=Infisical",
"SMTP_PORT=",
"SMTP_NAME=",
"SMTP_USERNAME=",
"SMTP_PASSWORD=",
"CLIENT_ID_HEROKU=",
"CLIENT_ID_VERCEL=",
"CLIENT_ID_NETLIFY=",
"CLIENT_ID_GITHUB=",
"CLIENT_ID_GITHUB_APP=",
"CLIENT_SLUG_GITHUB_APP=",
"CLIENT_ID_GITLAB=",
"CLIENT_ID_BITBUCKET=",
"CLIENT_SECRET_HEROKU=",
"CLIENT_SECRET_VERCEL=",
"CLIENT_SECRET_NETLIFY=",
"CLIENT_SECRET_GITHUB=",
"CLIENT_SECRET_GITHUB_APP=",
"CLIENT_SECRET_GITLAB=",
"CLIENT_SECRET_BITBUCKET=",
"CLIENT_SLUG_VERCEL=",
"CLIENT_PRIVATE_KEY_GITHUB_APP=",
"CLIENT_APP_ID_GITHUB_APP=",
"SENTRY_DSN=",
"POSTHOG_HOST=",
"POSTHOG_PROJECT_API_KEY=",
"CLIENT_ID_GOOGLE_LOGIN=",
"CLIENT_SECRET_GOOGLE_LOGIN=",
"CLIENT_ID_GITHUB_LOGIN=",
"CLIENT_SECRET_GITHUB_LOGIN=",
"CLIENT_ID_GITLAB_LOGIN=",
"CLIENT_SECRET_GITLAB_LOGIN=",
"CAPTCHA_SECRET=",
"NEXT_PUBLIC_CAPTCHA_SITE_KEY=",
"PLAIN_API_KEY=",
"PLAIN_WISH_LABEL_IDS=",
"SSL_CLIENT_CERTIFICATE_HEADER_KEY=",
]
mounts = []
[[config.domains]]
serviceName = "backend"
port = 8080
port = 8_080
host = "${main_domain}"
+5 -9
View File
@@ -1,14 +1,11 @@
services:
app:
image: ghcr.io/logto-io/logto:1.41.0
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
image: ghcr.io/logto-io/logto:1.27.0
entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
ports:
- 3001
- 3002
environment:
TRUST_PROXY_HEADER: 1
DB_URL: postgres://logto:${LOGTO_POSTGRES_PASSWORD}@postgres:5432/logto
@@ -18,20 +15,19 @@ services:
- logto-connectors:/etc/logto/packages/core/connectors
postgres:
image: postgres:17-alpine
user: postgres
restart: unless-stopped
environment:
POSTGRES_USER: logto
POSTGRES_PASSWORD: ${LOGTO_POSTGRES_PASSWORD}
POSTGRES_DB: logto
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
test: ["CMD-SHELL", "pg_isready -U logto -d logto"]
interval: 10s
timeout: 5s
retries: 5
volumes:
logto-connectors:
postgres-data:
+1 -1
View File
@@ -1,7 +1,7 @@
{
"id": "logto",
"name": "Logto",
"version": "1.27.0",
"version": "1.41.0",
"description": "Logto is an open-source Identity and Access Management (IAM) platform designed to streamline Customer Identity and Access Management (CIAM) and Workforce Identity Management.",
"logo": "logto.png",
"links": {
+2 -2
View File
@@ -1,7 +1,7 @@
[variables]
main_domain = "${domain}"
admin_domain = "${domain}"
postgres_password = "${password}"
postgres_password = "${password:32}"
[config]
mounts = []
@@ -17,6 +17,6 @@ port = 3_002
host = "${admin_domain}"
[config.env]
LOGTO_ENDPOINT = "http://${admin_domain}"
LOGTO_ENDPOINT = "http://${main_domain}"
LOGTO_ADMIN_ENDPOINT = "http://${admin_domain}"
LOGTO_POSTGRES_PASSWORD = "${postgres_password}"