2024-03-27 17:17:45 +00:00
# documentation: https://docs.logto.io/docs/tutorials/get-started/#logto-oss-self-hosted
# slogan: Logto offers a comprehensive identity solution covering both the front and backend, complete with pre-built infrastructure and enterprise-grade solutions.
# tags: logto,identity,login,authentication,oauth,oidc,openid
# icon: svgs/logto_dark.svg
# port: 3002
2024-04-16 10:42:12 +00:00
2024-03-27 17:17:45 +00:00
services :
logto :
depends_on :
postgres :
condition : service_healthy
image : svhd/logto:${TAG-latest}
entrypoint : [ "sh" , "-c" , "npm run cli db seed -- --swe && npm start" ]
environment :
- SERVICE_FQDN_AUTH_3001
2024-04-16 10:42:12 +00:00
- SERVICE_FQDN_AUTH_3002
2024-03-27 17:17:45 +00:00
- TRUST_PROXY_HEADER=1
2024-04-16 10:42:12 +00:00
- DB_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-logto}
2024-03-27 17:17:45 +00: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=$SERVICE_FQDN_AUTH
2024-04-16 10:42:12 +00:00
- ADMIN_ENDPOINT=$SERVICE_FQDN_AUTH
healthcheck :
test : [ "CMD" , "wget" , "-q" , "--spider" , "http://localhost:3002" ]
interval : 5s
timeout : 20s
retries : 10
2024-03-27 17:17:45 +00:00
postgres :
image : postgres:14-alpine
user : postgres
environment :
POSTGRES_USER : ${SERVICE_USER_POSTGRES}
POSTGRES_PASSWORD : ${SERVICE_PASSWORD_POSTGRES}
2024-04-16 10:42:12 +00:00
POSTGRES_DB : ${POSTGRES_DB:-logto}
2024-03-27 17:17:45 +00:00
volumes :
2024-04-16 10:42:12 +00:00
- logto-postgres-data:/var/lib/postgresql/data
healthcheck :
test : [ "CMD" , "pg_isready" , "-U" , "$SERVICE_USER_POSTGRES" ]
interval : 5s
timeout : 20s
retries : 10