diff --git a/public/svgs/logto_dark.svg b/public/svgs/logto_dark.svg new file mode 100644 index 000000000..c5f3fa0f6 --- /dev/null +++ b/public/svgs/logto_dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/templates/compose/logto.yaml b/templates/compose/logto.yaml new file mode 100644 index 000000000..c38c84f53 --- /dev/null +++ b/templates/compose/logto.yaml @@ -0,0 +1,39 @@ +# 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 +version: "3.9" +services: + logto: + depends_on: + postgres: + condition: service_healthy + image: svhd/logto:${TAG-latest} + entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"] + ports: + - 3001:3001 + - 3002:3002 + environment: + - SERVICE_FQDN_AUTH_3001 + - SERVICE_FQDN_LOGTO_3002 + - TRUST_PROXY_HEADER=1 + - DB_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB-logto} + # 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 + - ADMIN_ENDPOINT=$SERVICE_FQDN_LOGTO + postgres: + image: postgres:14-alpine + user: postgres + environment: + POSTGRES_USER: ${SERVICE_USER_POSTGRES} + POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES} + POSTGRES_DB: ${POSTGRES_DB-logto} + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 + volumes: + - logto-postgres-data:/var/lib/postgresql/data \ No newline at end of file