add and fix a lot of services

This commit is contained in:
Andras Bacsai
2024-04-16 12:42:12 +02:00
parent f871353acc
commit 02e4528f3e
16 changed files with 410 additions and 229 deletions

View File

@@ -3,7 +3,7 @@
# tags: logto,identity,login,authentication,oauth,oidc,openid
# icon: svgs/logto_dark.svg
# port: 3002
version: "3.9"
services:
logto:
depends_on:
@@ -11,29 +11,31 @@ services:
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
- SERVICE_FQDN_AUTH_3002
- TRUST_PROXY_HEADER=1
- DB_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB-logto}
- 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
- ADMIN_ENDPOINT=$SERVICE_FQDN_AUTH
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3002"]
interval: 5s
timeout: 20s
retries: 10
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
POSTGRES_DB: ${POSTGRES_DB:-logto}
volumes:
- logto-postgres-data:/var/lib/postgresql/data
- logto-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "$SERVICE_USER_POSTGRES"]
interval: 5s
timeout: 20s
retries: 10