2026-04-05 13:12:01 +02:00
|
|
|
# Logto OIDC Provider for Cameleer
|
|
|
|
|
# Provides external identity management with OAuth2/OIDC.
|
|
|
|
|
#
|
2026-04-13 22:51:08 +02:00
|
|
|
# Logto is proxy-aware: ENDPOINT and ADMIN_ENDPOINT (from cameleer-logto-credentials secret)
|
2026-04-05 13:31:17 +02:00
|
|
|
# set the public-facing URLs that Logto advertises in OIDC discovery, redirects, etc.
|
|
|
|
|
# When behind a reverse proxy (e.g., Traefik), set these to the external URLs.
|
|
|
|
|
#
|
2026-04-05 13:12:01 +02:00
|
|
|
# After deployment:
|
2026-04-05 13:31:17 +02:00
|
|
|
# 1. Access Logto admin console at the ADMIN_ENDPOINT URL
|
2026-04-05 13:12:01 +02:00
|
|
|
# 2. Complete initial setup (create admin account)
|
|
|
|
|
# 3. Create an Application for Cameleer (see HOWTO.md)
|
|
|
|
|
# 4. Create an API Resource with scopes (admin, operator, viewer)
|
|
|
|
|
# 5. Create an M2M Application for the SaaS platform
|
|
|
|
|
|
|
|
|
|
# --- PostgreSQL for Logto ---
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: StatefulSet
|
|
|
|
|
metadata:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
2026-04-13 22:51:08 +02:00
|
|
|
serviceName: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
2026-04-13 22:51:08 +02:00
|
|
|
app: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
2026-04-13 22:51:08 +02:00
|
|
|
app: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
spec:
|
|
|
|
|
containers:
|
2026-04-13 22:51:08 +02:00
|
|
|
- name: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
image: postgres:16-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 5432
|
|
|
|
|
env:
|
|
|
|
|
- name: POSTGRES_DB
|
|
|
|
|
value: logto
|
|
|
|
|
- name: POSTGRES_USER
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-credentials
|
2026-04-05 13:12:01 +02:00
|
|
|
key: PG_USER
|
|
|
|
|
- name: POSTGRES_PASSWORD
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-credentials
|
2026-04-05 13:12:01 +02:00
|
|
|
key: PG_PASSWORD
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: data
|
|
|
|
|
mountPath: /var/lib/postgresql/data
|
|
|
|
|
subPath: pgdata
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "128Mi"
|
|
|
|
|
cpu: "50m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "512Mi"
|
|
|
|
|
cpu: "500m"
|
|
|
|
|
livenessProbe:
|
2026-04-05 13:44:59 +02:00
|
|
|
tcpSocket:
|
|
|
|
|
port: 5432
|
2026-04-05 13:12:01 +02:00
|
|
|
initialDelaySeconds: 15
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
readinessProbe:
|
2026-04-05 13:44:59 +02:00
|
|
|
tcpSocket:
|
|
|
|
|
port: 5432
|
2026-04-05 13:12:01 +02:00
|
|
|
initialDelaySeconds: 5
|
|
|
|
|
periodSeconds: 5
|
|
|
|
|
volumeClaimTemplates:
|
|
|
|
|
- metadata:
|
|
|
|
|
name: data
|
|
|
|
|
spec:
|
|
|
|
|
accessModes: ["ReadWriteOnce"]
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
storage: 1Gi
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
clusterIP: None
|
|
|
|
|
selector:
|
2026-04-13 22:51:08 +02:00
|
|
|
app: cameleer-logto-postgresql
|
2026-04-05 13:12:01 +02:00
|
|
|
ports:
|
|
|
|
|
- port: 5432
|
|
|
|
|
targetPort: 5432
|
|
|
|
|
|
|
|
|
|
# --- Logto Server ---
|
|
|
|
|
---
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto
|
2026-04-05 13:12:01 +02:00
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
2026-04-13 22:51:08 +02:00
|
|
|
app: cameleer-logto
|
2026-04-05 13:12:01 +02:00
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
2026-04-13 22:51:08 +02:00
|
|
|
app: cameleer-logto
|
2026-04-05 13:12:01 +02:00
|
|
|
spec:
|
|
|
|
|
containers:
|
2026-04-13 22:51:08 +02:00
|
|
|
- name: cameleer-logto
|
2026-04-05 13:12:01 +02:00
|
|
|
image: ghcr.io/logto-io/logto:latest
|
|
|
|
|
command: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 3001
|
|
|
|
|
name: api
|
|
|
|
|
- containerPort: 3002
|
|
|
|
|
name: admin
|
|
|
|
|
env:
|
|
|
|
|
- name: TRUST_PROXY_HEADER
|
|
|
|
|
value: "1"
|
2026-04-05 13:39:50 +02:00
|
|
|
- name: PG_USER
|
2026-04-05 13:12:01 +02:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-credentials
|
2026-04-05 13:39:50 +02:00
|
|
|
key: PG_USER
|
|
|
|
|
- name: PG_PASSWORD
|
2026-04-05 13:12:01 +02:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-credentials
|
2026-04-05 13:39:50 +02:00
|
|
|
key: PG_PASSWORD
|
|
|
|
|
- name: DB_URL
|
2026-04-13 22:51:08 +02:00
|
|
|
value: "postgresql://$(PG_USER):$(PG_PASSWORD)@cameleer-logto-postgresql:5432/logto"
|
2026-04-05 13:39:50 +02:00
|
|
|
- name: ENDPOINT
|
2026-04-05 13:12:01 +02:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-credentials
|
2026-04-05 13:39:50 +02:00
|
|
|
key: ENDPOINT
|
|
|
|
|
- name: ADMIN_ENDPOINT
|
2026-04-05 13:12:01 +02:00
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto-credentials
|
2026-04-05 13:39:50 +02:00
|
|
|
key: ADMIN_ENDPOINT
|
2026-04-05 13:12:01 +02:00
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "256Mi"
|
|
|
|
|
cpu: "100m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "512Mi"
|
|
|
|
|
cpu: "500m"
|
|
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /api/status
|
|
|
|
|
port: 3001
|
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
|
periodSeconds: 15
|
|
|
|
|
timeoutSeconds: 5
|
|
|
|
|
failureThreshold: 5
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /api/status
|
|
|
|
|
port: 3001
|
|
|
|
|
initialDelaySeconds: 30
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
timeoutSeconds: 3
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
2026-04-13 22:51:08 +02:00
|
|
|
name: cameleer-logto
|
2026-04-05 13:12:01 +02:00
|
|
|
namespace: cameleer
|
|
|
|
|
spec:
|
|
|
|
|
type: NodePort
|
|
|
|
|
selector:
|
2026-04-13 22:51:08 +02:00
|
|
|
app: cameleer-logto
|
2026-04-05 13:12:01 +02:00
|
|
|
ports:
|
|
|
|
|
- port: 3001
|
|
|
|
|
targetPort: 3001
|
|
|
|
|
nodePort: 30951
|
|
|
|
|
name: api
|
|
|
|
|
- port: 3002
|
|
|
|
|
targetPort: 3002
|
|
|
|
|
nodePort: 30952
|
|
|
|
|
name: admin
|