mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-05 06:32:56 +00:00
更新 .env 示例文件以包含新的管理员用户 ID 和密码哈希,调整 docker-compose 配置以支持健康检查和网络设置,优化 Dex 配置以使用环境变量。此更改增强了 OIDC 认证的灵活性和安全性。
This commit is contained in:
committed by
Yuzhong Zhang
parent
4da39f2d6a
commit
bff23e9117
+3
-2
@@ -1,11 +1,12 @@
|
||||
OIDC_ISSUER_URL=http://localhost:5556/.well-known/openid-configuration
|
||||
OIDC_ISSUER_URL=http://localhost:5556
|
||||
OIDC_CLIENT_ID=excalidraw
|
||||
OIDC_CLIENT_SECRET=excalidraw-secret
|
||||
OIDC_REDIRECT_URL=http://localhost:3002/auth/oidc/callback
|
||||
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_PASSWORD=your_secure_password
|
||||
ADMIN_PASSWORD_HASH='$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W'
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_USER_ID=admin1234
|
||||
|
||||
JWT_SECRET=your_super_secret_jwt_string
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
issuer: http://localhost:5556
|
||||
issuer: {{ .Env.OIDC_ISSUER }}
|
||||
|
||||
storage:
|
||||
type: memory
|
||||
|
||||
+23
-11
@@ -1,16 +1,23 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
netpod:
|
||||
image: busybox:latest
|
||||
ports:
|
||||
- "5556:5556" # Dex
|
||||
- "3002:3002" # Excalidraw
|
||||
command: ["sleep", "infinity"]
|
||||
networks:
|
||||
- excalidraw-network
|
||||
|
||||
dex:
|
||||
image: dexidp/dex:v2.38.0
|
||||
container_name: excalidraw-dex
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5556:5556"
|
||||
volumes:
|
||||
- ./config/dex.config.yaml:/etc/dex/config.yaml
|
||||
environment:
|
||||
- OIDC_REDIRECT_URL=${OIDC_REDIRECT_URL:-http://localhost:3000/auth/oidc/callback}
|
||||
- OIDC_REDIRECT_URL=${OIDC_REDIRECT_URL:-http://localhost:3002/auth/oidc/callback}
|
||||
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-excalidraw-secret}
|
||||
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-excalidraw}
|
||||
- OIDC_ISSUER=${OIDC_ISSUER:-http://localhost:5556}
|
||||
@@ -19,20 +26,25 @@ services:
|
||||
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@example.com}
|
||||
- ADMIN_USER_ID=${ADMIN_USER_ID:-'admin1234'}
|
||||
command: ["dex", "serve", "/etc/dex/config.yaml"]
|
||||
networks:
|
||||
- dex-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:5556/.well-known/openid-configuration"]
|
||||
interval: 1s
|
||||
timeout: 1s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
network_mode: service:netpod
|
||||
|
||||
excalidraw:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: excalidraw-complete.Dockerfile
|
||||
ports:
|
||||
- "3003:3002"
|
||||
image: ghcr.io/betterandbetterii/excalidraw-full:dex-oidc
|
||||
volumes:
|
||||
- ./data:/root/data
|
||||
- ./excalidraw.db:/root/excalidraw.db:Z
|
||||
- ./.env:/root/.env
|
||||
depends_on:
|
||||
dex:
|
||||
condition: service_healthy
|
||||
network_mode: service:netpod
|
||||
|
||||
networks:
|
||||
dex-network:
|
||||
excalidraw-network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user