coolify/templates/compose/logto.yaml

39 lines
1.5 KiB
YAML
Raw Normal View History

2024-03-27 18:17:45 +01:00
# documentation: https://docs.logto.io/docs/tutorials/get-started/#logto-oss-self-hosted
2024-05-31 10:55:02 +02:00
# slogan: A comprehensive identity solution covering both the front and backend, complete with pre-built infrastructure and enterprise-grade solutions.
2024-03-27 18:17:45 +01:00
# tags: logto,identity,login,authentication,oauth,oidc,openid
# logo: svgs/logto_dark.svg
2024-04-16 12:42:12 +02:00
2024-03-27 18:17:45 +01:00
services:
logto:
image: svhd/logto:${TAG-latest}
2024-03-27 18:17:45 +01:00
depends_on:
postgres:
condition: service_healthy
entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
environment:
- TRUST_PROXY_HEADER=1
2024-04-16 12:42:12 +02:00
- DB_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-logto}
2024-03-27 18:17:45 +01:00
# Mandatory for GitPod to map host env to the container, thus GitPod can dynamically configure the public URL of Logto;
# Or, you can leverage it for local testing.
- ENDPOINT=$LOGTO_ENDPOINT
- ADMIN_ENDPOINT=$LOGTO_ADMIN_ENDPOINT
2024-04-16 12:42:12 +02:00
healthcheck:
2024-05-31 10:55:02 +02:00
test: ["CMD-SHELL", "exit 0"]
2024-04-16 12:42:12 +02:00
interval: 5s
timeout: 20s
retries: 10
2024-03-27 18:17:45 +01:00
postgres:
image: postgres:14-alpine
user: postgres
environment:
POSTGRES_USER: ${SERVICE_USER_POSTGRES}
POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES}
2024-04-16 12:42:12 +02:00
POSTGRES_DB: ${POSTGRES_DB:-logto}
2024-03-27 18:17:45 +01:00
volumes:
2024-04-16 12:42:12 +02:00
- logto-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "$SERVICE_USER_POSTGRES", "-d", "$POSTGRES_DB"]
2024-04-16 12:42:12 +02:00
interval: 5s
timeout: 20s
retries: 10