lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
44.39k stars 9.95k forks source link

[Request] 提供一个ZITADEL 身份验证服务本地部署参考 #4060

Closed SpeedupMaster closed 4 weeks ago

SpeedupMaster commented 1 month ago

🥰 需求描述

ZITADEL 身份验证服务本地部署

🧐 解决方案

docker compose

services:
  network-service:
    image: alpine
    container_name: lobe-network
    ports:
      - '9000:9000'  # MinIO API
      - '9001:9001'  # MinIO Console
      - '8080:8080' # Zitadel Console
      - '3210:3210' # LobeChat
    command: tail -f /dev/null
    networks:
      - lobe-network

  postgresql:
    image: pgvector/pgvector:pg16
    container_name: lobe-postgres
    ports:
      - "5432:5432"
    volumes:
      - './data:/var/lib/postgresql/data'
    environment:
      - 'POSTGRES_DB=lobechat'
      - 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC'
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 5s
      timeout: 5s
      retries: 5
    restart: always
    networks:
      - lobe-network

  minio:
    image: minio/minio
    container_name: lobe-minio
    network_mode: 'service:network-service'
    volumes:
      - './s3_data:/etc/minio/data'
    environment:
      - 'MINIO_ROOT_USER=YOUR_MINIO_USER'
      - 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD'
      - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:3210'
    restart: always
    command: >
      server /etc/minio/data --address ":9000" --console-address ":9001"

  zitadel:
    restart: 'always'
    image: 'ghcr.io/zitadel/zitadel:latest'
    container_name: lobe-zitadel
    network_mode: 'service:network-service'
    command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
    environment:
      - 'ZITADEL_DATABASE_POSTGRES_HOST=postgresql'
      - 'ZITADEL_DATABASE_POSTGRES_PORT=5432'
      - 'ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=uWNZugjBqixf8dxC'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable'
      - 'ZITADEL_EXTERNALSECURE=false'
    depends_on:
      postgresql:
        condition: service_healthy

  lobe:
    image: lobehub/lobe-chat-database
    container_name: lobe-database
    network_mode: 'service:network-service'
    depends_on:
      postgresql:
        condition: service_healthy
      network-service:
        condition: service_started
      minio:
        condition: service_started
      zitadel:
        condition: service_started
    env_file:
      - .env
    restart: always

volumes:
  data:
    driver: local
  s3_data:
    driver: local

networks:
  lobe-network:
    driver: bridge

.env

# LobeChat 域名
APP_URL=http://localhost:3210

# Postgres 相关,也即 DB 必须的环境变量
# 用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成
KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
# Postgres 数据库连接字符串
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat

# NEXT_AUTH 相关
AUTH_URL=http://localhost:3210/api/auth
NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
NEXT_AUTH_SSO_PROVIDERS=zitadel
AUTH_ZITADEL_ID=285945938244075523
AUTH_ZITADEL_SECRET=hkbtzHLaCEIeHeFThym14UcydpmQiEB5JtAX08HSqSoJxhAlVVkyovTuNUZ5TNrT
AUTH_ZITADEL_ISSUER=http://localhost:8080

# MinIO S3 配置
S3_ACCESS_KEY_ID=        
S3_SECRET_ACCESS_KEY=
S3_ENDPOINT=http://localhost:9000
S3_BUCKET=lobe 
S3_PUBLIC_DOMAIN=http://localhost:9000
S3_ENABLE_PATH_STYLE=1

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.localhost
password: Password1!

zitadel的配置参考:ref

📝 补充信息

No response

lobehubbot commented 1 month ago

👀 @SpeedupMaster

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

SpeedupMaster commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用openssl rand -base64 24生成,不过注意要是32个字符 In the above username, replace localhost with your configured external domain, if any. e.g. with zitadel-admin@zitadel.sso.my.domain.tld

arvinxx commented 1 month ago

欢迎提交 PR~

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Welcome to submit PR~

zhangleijun111 commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用生成,不过注意要是32个字符 在上面的用户名中,将 localhost 替换为您配置的外部域(如果有)。例如,使用 zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

你的这套支持纯内网部署嘛

SpeedupMaster commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用生成,不过注意要是32个字符 在上面的用户名中,将 localhost 替换为您配置的外部域(如果有)。例如,使用 zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

你的这套支持纯内网部署嘛

这几个验证服务不都是一样的吗。如果只是在电脑上部署用本地部署就可以了。

zhangleijun111 commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用生成,不过注意要是32个字符 在上面的用户名中,将 localhost 替换为您配置的外部域(如果有)。例如,使用 zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

你的这套支持纯内网部署嘛

这几个验证服务不都是一样的吗。如果只是在电脑上部署用本地部署就可以了。

我意思部署完内网的其他机器可以访问部署这台机器来使用这套lobedatabase,不是单机版的那种,单机版用logto就可以了,我是想问生产部署的事情。

SpeedupMaster commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用生成,不过注意要是32个字符 在上面的用户名中,将 localhost 替换为您配置的外部域(如果有)。例如,使用 zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

你的这套支持纯内网部署嘛

这几个验证服务不都是一样的吗。如果只是在电脑上部署用本地部署就可以了。

我意思部署完内网的其他机器可以访问部署这台机器来使用这套lobedatabase,不是单机版的那种,单机版用logto就可以了,我是想问生产部署的事情。

你自己试一下,我没试过

zhangleijun111 commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用生成,不过注意要是32个字符 在上面的用户名中,将 localhost 替换为您配置的外部域(如果有)。例如,使用 zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

你的这套支持纯内网部署嘛

这几个验证服务不都是一样的吗。如果只是在电脑上部署用本地部署就可以了。

我意思部署完内网的其他机器可以访问部署这台机器来使用这套lobedatabase,不是单机版的那种,单机版用logto就可以了,我是想问生产部署的事情。

你自己试一下,我没试过

明白谢谢不懂请教你

SpeedupMaster commented 1 month ago

如果想要在生成环境部署需要做出如下修改:

  zitadel:
    restart: always
    image: ghcr.io/zitadel/zitadel:latest
    container_name: lobe-zitadel
    command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
      --tlsMode external
    environment:
      - ZITADEL_EXTERNALPORT=443
      - ZITADEL_EXTERNALSECURE=true
      - ZITADEL_TLS_ENABLED=false
      - ZITADEL_EXTERNALDOMAIN=xxxxxx.com #你的域名,需要反向代理到http://localhost:8080
      - ZITADEL_DATABASE_POSTGRES_HOST=postgresql
      - ZITADEL_DATABASE_POSTGRES_PORT=5432
      - ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
      - ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
      - ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
      - ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
      - ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
    depends_on:
      postgresql:
        condition: service_healthy
    ports:
      - 8080:8080

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.xxxxxx.com(ZITADEL_EXTERNALDOMAIN设置的域名)
password: Password1!

MasterkeyNeedsToHave32Characters可以用生成,不过注意要是32个字符 在上面的用户名中,将 localhost 替换为您配置的外部域(如果有)。例如,使用 zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

你的这套支持纯内网部署嘛

这几个验证服务不都是一样的吗。如果只是在电脑上部署用本地部署就可以了。

我意思部署完内网的其他机器可以访问部署这台机器来使用这套lobedatabase,不是单机版的那种,单机版用logto就可以了,我是想问生产部署的事情。

你自己试一下,我没试过

明白谢谢不懂请教你

感觉部署应该和本地部署一样的,只是要如何解决其他机器访问的问题

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If you want to deploy in the production environment, you need to make the following modifications:

zitadel:
restart: always
image: ghcr.io/zitadel/zitadel:latest
container_name: lobe-zitadel
command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters"
--tlsMode external
environment:
- ZITADEL_EXTERNALPORT=443
- ZITADEL_EXTERNALSECURE=true
- ZITADEL_TLS_ENABLED=false
- ZITADEL_EXTERNALDOMAIN=xxxxxx.com #Your domain name needs to be reverse proxy to http://localhost:8080
- ZITADEL_DATABASE_POSTGRES_HOST=postgresql
- ZITADEL_DATABASE_POSTGRES_PORT=5432
- ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
- ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
- ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
- ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
- ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres
- ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=b750e83ac80f7261513a98xxxxxxx
- ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
depends_on:
postgresql:
condition: service_healthy
ports:
- 8080:8080

The initial administrator account password of zitadel is:

username: zitadel-admin@zitadel.xxxxxx.com (domain name set by ZITADEL_EXTERNALDOMAIN)
password: Password1!

MasterkeyNeedsToHave32Characters can be generated, but note that it must be 32 characters. In the username above, replace localhost with the external domain you configured (if any). For example, use zitadel-admin@zitadel.sso.my.domain.tldopenssl rand -base64 24

Does your set support pure intranet deployment?

Aren't these verification services all the same? If you just deploy it on your computer, you can use local deployment.

I mean that after deployment, other machines on the intranet can access and deploy this machine to use this set of lobedatabase. It is not the stand-alone version. For the stand-alone version, just use logto. I want to ask about production deployment.

Try it yourself, I haven’t tried it.

I understand, thank you. I don’t understand. Please tell me.

I feel that deployment should be the same as local deployment, but how to solve the problem of access from other machines

salihselimsekerci commented 1 month ago

Docker Compose Dosyası Yapılandırması ZITADEL ve PostgreSQL veritabanı için bir Docker Compose dosyası oluşturalım. ZITADEL için gereken yapılandırma komutları ve çevre değişkenlerini dosyada tanımlıyoruz. `version: '3'

services: postgresql: image: postgres:13 restart: always environment: POSTGRES_USER: zitadel POSTGRES_PASSWORD: zitadel POSTGRES_DB: zitadel volumes:

volumes: postgres_data: Master Key Oluşturma ZITADEL, güvenlik için bir master anahtara ihtiyaç duyuyor. Bu anahtar 32 karakter uzunluğunda olmalı. Aşağıdaki komutla 32 karakterlik bir anahtar oluşturabilirsin: openssl rand -base64 24 ` Bu anahtarı Docker Compose dosyasında yer alan MasterkeyNeedsToHave32Characters kısmına yapıştır.

Kullanıcı Bilgileri ZITADEL yönetici hesabı şu şekilde oluşturulur:

Kullanıcı adı: zitadel-admin@your-domain.com (ZITADEL_EXTERNALDOMAIN değişkeninde belirttiğiniz domain) Şifre: Password1! (Kurulumdan sonra değiştirilebilir) ZITADEL'e Erişim Docker Compose ile ZITADEL ve PostgreSQL konteynerlerini çalıştırdıktan sonra, ZITADEL uygulamasına erişmek için tarayıcınızda http://localhost:8080 adresini kullanabilirsin. İlk oturum açmada yukarıdaki yönetici hesabını kullanarak giriş yapabilirsin.

Bu adımlarla ZITADEL kimlik doğrulama hizmetini yerel bir ortamda başarıyla çalıştırabilir ve Docker Compose ile entegrasyon sağlayabilirsin.

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Docker Compose File Configuration Let's create a Docker Compose file for ZITADEL and the PostgreSQL database. We define the configuration commands and environment variables required for ZITADEL in the file. `version: '3'

services: postgresql: image: postgres:13 restart: always environment: POSTGRES_USER: zitadel POSTGRES_PASSWORD: zitadel POSTGRES_DB: zitadel volumes:

volumes: postgres_data: Creating a Master Key ZITADEL needs a master key for security. This key must be 32 characters long. You can create a 32-character key with the following command: openssl rand -base64 24 ` Paste this key into the MasterkeyNeedsToHave32Characters section in the Docker Compose file.

User Information The ZITADEL administrator account is created as follows:

Username: zitadel-admin@your-domain.com (the domain you specified in the ZITADEL_EXTERNALDOMAIN variable) Password: Password1! (Can be changed after installation) Access to ZITADEL After running the ZITADEL and PostgreSQL containers with Docker Compose, you can use http://localhost:8080 in your browser to access the ZITADEL application. For the first login, you can log in using the administrator account above.

With these steps, you can successfully run the ZITADEL authentication service in a local environment and integrate with Docker Compose.

salihselimsekerci commented 1 month ago

Docker Compose File Configuration Let's create a Docker Compose file for ZITADEL and the PostgreSQL database. We define the configuration commands and environment variables required for ZITADEL in the file. `version: '3'

services: postgresql: image: postgres:13 restart: always environment: POSTGRES_USER: zitadel POSTGRES_PASSWORD: zitadel POSTGRES_DB: zitadel volumes:

zitadel: image: ghcr.io/zitadel/zitadel:latest restart: always command: start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode external environment:

volumes: postgres_data: Creating a Master Key ZITADEL needs a master key for security. This key must be 32 characters long. You can create a 32-character key with the following command:openssl rand -base64 24 ` Paste this key into the MasterkeyNeedsToHave32Characters section in the Docker Compose file.

User Information The ZITADEL administrator account is created as follows:

Username: zitadel-admin@your-domain.com (the domain you specified in the ZITADEL_EXTERNALDOMAIN variable) Password: Password1! (Can be changed after installation) Access to ZITADEL After running the ZITADEL and PostgreSQL containers with Docker Compose, you can use http://localhost:8080/ in your browser to access the ZITADEL application. For the first login, you can log in using the administrator account above.

With these steps, you can successfully run the ZITADEL authentication service in a local environment and integrate with Docker Compose.

zhangleijun111 commented 1 month ago

🥰 需求描述

ZITADEL 身份验证服务本地部署

🧐 解决方案

docker compose

services:
  network-service:
    image: alpine
    container_name: lobe-network
    ports:
      - '9000:9000'  # MinIO API
      - '9001:9001'  # MinIO Console
      - '8080:8080' # Zitadel Console
      - '3210:3210' # LobeChat
    command: tail -f /dev/null
    networks:
      - lobe-network

  postgresql:
    image: pgvector/pgvector:pg16
    container_name: lobe-postgres
    ports:
      - "5432:5432"
    volumes:
      - './data:/var/lib/postgresql/data'
    environment:
      - 'POSTGRES_DB=lobechat'
      - 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC'
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 5s
      timeout: 5s
      retries: 5
    restart: always
    networks:
      - lobe-network

  minio:
    image: minio/minio
    container_name: lobe-minio
    network_mode: 'service:network-service'
    volumes:
      - './s3_data:/etc/minio/data'
    environment:
      - 'MINIO_ROOT_USER=YOUR_MINIO_USER'
      - 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD'
      - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:3210'
    restart: always
    command: >
      server /etc/minio/data --address ":9000" --console-address ":9001"

  zitadel:
    restart: 'always'
    image: 'ghcr.io/zitadel/zitadel:latest'
    container_name: lobe-zitadel
    network_mode: 'service:network-service'
    command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
    environment:
      - 'ZITADEL_DATABASE_POSTGRES_HOST=postgresql'
      - 'ZITADEL_DATABASE_POSTGRES_PORT=5432'
      - 'ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=uWNZugjBqixf8dxC'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable'
      - 'ZITADEL_EXTERNALSECURE=false'
    depends_on:
      postgresql:
        condition: service_healthy

  lobe:
    image: lobehub/lobe-chat-database
    container_name: lobe-database
    network_mode: 'service:network-service'
    depends_on:
      postgresql:
        condition: service_healthy
      network-service:
        condition: service_started
      minio:
        condition: service_started
      zitadel:
        condition: service_started
    env_file:
      - .env
    restart: always

volumes:
  data:
    driver: local
  s3_data:
    driver: local

networks:
  lobe-network:
    driver: bridge

.env

# LobeChat 域名
APP_URL=http://localhost:3210

# Postgres 相关,也即 DB 必须的环境变量
# 用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成
KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
# Postgres 数据库连接字符串
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat

# NEXT_AUTH 相关
AUTH_URL=http://localhost:3210/api/auth
NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
NEXT_AUTH_SSO_PROVIDERS=zitadel
AUTH_ZITADEL_ID=285945938244075523
AUTH_ZITADEL_SECRET=hkbtzHLaCEIeHeFThym14UcydpmQiEB5JtAX08HSqSoJxhAlVVkyovTuNUZ5TNrT
AUTH_ZITADEL_ISSUER=http://localhost:8080

# MinIO S3 配置
S3_ACCESS_KEY_ID=        
S3_SECRET_ACCESS_KEY=
S3_ENDPOINT=http://localhost:9000
S3_BUCKET=lobe 
S3_PUBLIC_DOMAIN=http://localhost:9000
S3_ENABLE_PATH_STYLE=1

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.localhost
password: Password1!

zitadel的配置参考:ref

📝 补充信息

无响应

访问8080报这个错误 f66d2193c2c7f5656b87e7b1857d328

SpeedupMaster commented 1 month ago

🥰 需求描述

ZITADEL 身份验证服务本地部署

🧐 解决方案

docker compose

services:
  network-service:
    image: alpine
    container_name: lobe-network
    ports:
      - '9000:9000'  # MinIO API
      - '9001:9001'  # MinIO Console
      - '8080:8080' # Zitadel Console
      - '3210:3210' # LobeChat
    command: tail -f /dev/null
    networks:
      - lobe-network

  postgresql:
    image: pgvector/pgvector:pg16
    container_name: lobe-postgres
    ports:
      - "5432:5432"
    volumes:
      - './data:/var/lib/postgresql/data'
    environment:
      - 'POSTGRES_DB=lobechat'
      - 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC'
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 5s
      timeout: 5s
      retries: 5
    restart: always
    networks:
      - lobe-network

  minio:
    image: minio/minio
    container_name: lobe-minio
    network_mode: 'service:network-service'
    volumes:
      - './s3_data:/etc/minio/data'
    environment:
      - 'MINIO_ROOT_USER=YOUR_MINIO_USER'
      - 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD'
      - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:3210'
    restart: always
    command: >
      server /etc/minio/data --address ":9000" --console-address ":9001"

  zitadel:
    restart: 'always'
    image: 'ghcr.io/zitadel/zitadel:latest'
    container_name: lobe-zitadel
    network_mode: 'service:network-service'
    command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
    environment:
      - 'ZITADEL_DATABASE_POSTGRES_HOST=postgresql'
      - 'ZITADEL_DATABASE_POSTGRES_PORT=5432'
      - 'ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel'
      - 'ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=uWNZugjBqixf8dxC'
      - 'ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable'
      - 'ZITADEL_EXTERNALSECURE=false'
    depends_on:
      postgresql:
        condition: service_healthy

  lobe:
    image: lobehub/lobe-chat-database
    container_name: lobe-database
    network_mode: 'service:network-service'
    depends_on:
      postgresql:
        condition: service_healthy
      network-service:
        condition: service_started
      minio:
        condition: service_started
      zitadel:
        condition: service_started
    env_file:
      - .env
    restart: always

volumes:
  data:
    driver: local
  s3_data:
    driver: local

networks:
  lobe-network:
    driver: bridge

.env

# LobeChat 域名
APP_URL=http://localhost:3210

# Postgres 相关,也即 DB 必须的环境变量
# 用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成
KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
# Postgres 数据库连接字符串
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat

# NEXT_AUTH 相关
AUTH_URL=http://localhost:3210/api/auth
NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
NEXT_AUTH_SSO_PROVIDERS=zitadel
AUTH_ZITADEL_ID=285945938244075523
AUTH_ZITADEL_SECRET=hkbtzHLaCEIeHeFThym14UcydpmQiEB5JtAX08HSqSoJxhAlVVkyovTuNUZ5TNrT
AUTH_ZITADEL_ISSUER=http://localhost:8080

# MinIO S3 配置
S3_ACCESS_KEY_ID=        
S3_SECRET_ACCESS_KEY=
S3_ENDPOINT=http://localhost:9000
S3_BUCKET=lobe 
S3_PUBLIC_DOMAIN=http://localhost:9000
S3_ENABLE_PATH_STYLE=1

zitadel初始管理员账户密码为:

username: zitadel-admin@zitadel.localhost
password: Password1!

zitadel的配置参考:ref

📝 补充信息

无响应

访问8080报这个错误 f66d2193c2c7f5656b87e7b1857d328

http://localhost:8080访问,如果你要用这个IP访问的话需要设置ZITADEL_EXTERNALDOMAIN=172.20.8.120

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

ZITADEL authentication service local deployment

🧐 Solution

docker compose

services:
network-service:
image: alpine
container_name: lobe-network
ports:
- '9000:9000' # MinIO API
- '9001:9001' # MinIO Console
- '8080:8080' # Zitadel Console
- '3210:3210' # LobeChat
command: tail -f /dev/null
networks:
-lobe-network

postgresql:
image: pgvector/pgvector:pg16
container_name: lobe-postgres
ports:
- "5432:5432"
volumes:
- './data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_DB=lobechat'
- 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
restart: always
networks:
- lobe-network

minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
volumes:
- './s3_data:/etc/minio/data'
environment:
- 'MINIO_ROOT_USER=YOUR_MINIO_USER'
- 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD'
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:3210'
restart: always
command: >
server /etc/minio/data --address ":9000" --console-address ":9001"

zitadel:
restart: 'always'
image: 'ghcr.io/zitadel/zitadel:latest'
container_name: lobe-zitadel
network_mode: 'service:network-service'
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
environment:
- 'ZITADEL_DATABASE_POSTGRES_HOST=postgresql'
- 'ZITADEL_DATABASE_POSTGRES_PORT=5432'
- 'ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel'
- 'ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel'
- 'ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel'
- 'ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable'
- 'ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=postgres'
- 'ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=uWNZugjBqixf8dxC'
- 'ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable'
- 'ZITADEL_EXTERNALSECURE=false'
depends_on:
postgresql:
condition: service_healthy

lobe:
image: lobehub/lobe-chat-database
container_name: lobe-database
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
network-service:
condition: service_started
minio:
condition: service_started
zitadel:
condition: service_started
env_file:
- .env
restart: always

volumes:
data:
driver: local
s3_data:
driver: local

networks:
lobe-network:
driver: bridge

.env

#LobeChat domain name
APP_URL=http://localhost:3210

# Postgres related, that is, environment variables necessary for DB
# The key used to encrypt sensitive information can be generated using openssl rand -base64 32
KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
# Postgres database connection string
DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat

# NEXT_AUTH related
AUTH_URL=http://localhost:3210/api/auth
NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
NEXT_AUTH_SSO_PROVIDERS=zitadel
AUTH_ZITADEL_ID=285945938244075523
AUTH_ZITADEL_SECRET=hkbtzHLaCEIeHeFThym14UcydpmQiEB5JtAX08HSqSoJxhAlVVkyovTuNUZ5TNrT
AUTH_ZITADEL_ISSUER=http://localhost:8080

# MinIO S3 configuration
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_ENDPOINT=http://localhost:9000
S3_BUCKET=lobe
S3_PUBLIC_DOMAIN=http://localhost:9000
S3_ENABLE_PATH_STYLE=1

The initial administrator account password of zitadel is:

username: zitadel-admin@zitadel.localhost
password: Password1!

Zitadel configuration reference: ref

📝 Supplementary information

No response

Access 8080 and report this error ![f66d2193c2c7f5656b87e7b1857d328](https://private-user-images.githubusercontent.com/169867372/370530188-38e70970-6999-4c87-8043-bd8d2f4e5a78. png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXV kIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjcyNDA zNTMsIm5iZiI6MTcyNzI0MDA1MywicGF0aCI6Ii8xNjk4NjczNzIvMzcwNTMwMTg4LTM4ZTcwOTcwLTY5OTktNGM4Ny04MDQzLWJkOGQyZjRlNWE3OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUz QtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0 MDkyNVQwNDU0MTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNDE4MWVlYWVhZDhmN2QxMjVlNjYzYzEwYWIyOGFiZTAyOWJkMzgxMjk2OGQ4NmY0MDQ0ZWMwNDY4NTQzN DI4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.5Nxp1eBN4cJoGzRn -q5Fp2GZr0AUWZIlK-lrWYnAGxY)

Use http://localhost:8080 to access. If you want to use this IP to access, you need to set ZITADEL_EXTERNALDOMAIN=172.20.8.120

zhangleijun111 commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

salihselimsekerci commented 1 month ago

Ye

SpeedupMaster commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

zhangleijun111 commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

ZITADEL支持生产部署嘛,因为casdoor和logto本地部署我都做到了,我只是想进一步做到生产部署,内网的其他机器可以通过ip或者域名的方式访问这样的。

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

ZITADEL supports production deployment, because I have done local deployment of casdoor and logto. I just want to further implement production deployment. Other machines on the intranet can access it through IP or domain name.

SpeedupMaster commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

ZITADEL支持生产部署嘛,因为casdoor和logto本地部署我都做到了,我只是想进一步做到生产部署,内网的其他机器可以通过ip或者域名的方式访问这样的。

这些都支持生成部署的

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

ZITADEL supports production deployment, because I have done local deployment of casdoor and logto. I just want to further implement production deployment. Other machines in the intranet can access it through IP or domain name.

These all support generating and deploying

zhangleijun111 commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

ZITADEL支持生产部署嘛,因为casdoor和logto本地部署我都做到了,我只是想进一步做到生产部署,内网的其他机器可以通过ip或者域名的方式访问这样的。

这些都支持生成部署的

但是logto我用内网docker-compose部署一个月了也没成功,casdoor生产部署的dokcer-compose文件目前也没有出来

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

ZITADEL supports production deployment, because I have done local deployment of casdoor and logto. I just want to further implement production deployment. Other machines in the intranet can access it through IP or domain name.

These all support generation and deployment

However, I have been deploying logto using docker-compose on the intranet for a month without success. The dokcer-compose file deployed by casdoor in production has not been released yet.

zhangleijun111 commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

ZITADEL支持生产部署嘛,因为casdoor和logto本地部署我都做到了,我只是想进一步做到生产部署,内网的其他机器可以通过ip或者域名的方式访问这样的。

这些都支持生成部署的

你看下我们沟通的另外一个case,我把casdoor的localhost全部换成了ip,他就用不了了哈哈哈

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

ZITADEL supports production deployment, because I have done local deployment of casdoor and logto. I just want to further implement production deployment. Other machines in the intranet can access it through IP or domain name.

These all support generation and deployment

Take a look at another case we communicated with. I changed all the localhosts of casdoor to IP addresses, and he couldn’t use them hahaha.

SpeedupMaster commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

ZITADEL支持生产部署嘛,因为casdoor和logto本地部署我都做到了,我只是想进一步做到生产部署,内网的其他机器可以通过ip或者域名的方式访问这样的。

这些都支持生成部署的

你看下我们沟通的另外一个case,我把casdoor的localhost全部换成了ip,他就用不了了哈哈哈

不清楚你是怎么部署的,我在VPS上部署后,通过IP:端口访问是没问题的

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

ZITADEL supports production deployment, because I have done local deployment of casdoor and logto. I just want to further implement production deployment. Other machines in the intranet can access it through IP or domain name.

These all support generation and deployment

Take a look at another case we communicated with. I changed the localhost of casdoor to IP, and he couldn’t use it hahaha

I’m not sure how you deployed it. After I deployed it on the VPS, access via IP:port was no problem.

zhangleijun111 commented 1 month ago

ZITADEL_EXTERNALDOMAIN=172.20.8.120

在docker-compose里面加一句ZITADEL_EXTERNALDOMAIN=172.20.8.120 这个是嘛

是的

ZITADEL支持生产部署嘛,因为casdoor和logto本地部署我都做到了,我只是想进一步做到生产部署,内网的其他机器可以通过ip或者域名的方式访问这样的。

这些都支持生成部署的

你看下我们沟通的另外一个case,我把casdoor的localhost全部换成了ip,他就用不了了哈哈哈

不清楚你是怎么部署的,我在VPS上部署后,通过IP:端口访问是没问题的

你是指ZITADEL还是casdoor,我用的docker-compose部署的

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ZITADEL_EXTERNALDOMAIN=172.20.8.120

Add ZITADEL_EXTERNALDOMAIN=172.20.8.120 in docker-compose. Is this right?

Yes

ZITADEL supports production deployment, because I have done local deployment of casdoor and logto. I just want to further implement production deployment. Other machines in the intranet can access this through IP or domain name.

These all support generation and deployment

Take a look at another case we communicated with. I changed the localhost of casdoor to IP, and he couldn’t use it hahaha

I’m not sure how you deployed it. After I deployed it on the VPS, access via IP: port is no problem.

Do you mean ZITADEL or casdoor? I deployed it using docker-compose.

yincangshiwei commented 1 month ago

大佬求救,我是生产https部署的,配置如下: image 在lobe里输入完账号和密码,登录总是报错,lobe日志里面完全看不出具体是哪里有问题: image zitadel的日志: image

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Sir please help, I deployed https in production, the configuration is as follows: image After entering the account and password in Lobe, an error always occurs when logging in. The specific problem cannot be seen in the Lobe log: image zitadel's log: image

yincangshiwei commented 1 month ago

zitadel配置: image image image

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


zitadel配置: image image image

SpeedupMaster commented 1 month ago

大佬求救,我是生产https部署的,配置如下: image 在lobe里输入完账号和密码,登录总是报错,lobe日志里面完全看不出具体是哪里有问题: image zitadel的日志: image

AUTH_URL和NEXT_AUTHURL删掉其中的一个 APP_URL是你的lobechat域名 重定向URL是你的lobechat域名+/api/auth/callback/zitadel AUTH_URL是你的lobechat域名+/api/auth

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Boss, please help, I am deploying https in production, the configuration is as follows: ![image](https://private-user-images.githubusercontent.com/8185843/370967734-fb57bc2c-05aa-4285-ab84-a1915329f8c2.png? jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..D7mDYzUdNEuAFSeUQv_XSqZu2ihEgcweGjQmx-qAaQI) After entering the account and password in lobe, an error always occurs when logging in. The specific problem cannot be seen in the lobe log: ![image](https://private-user-images .githubusercontent.com/8185843/370967975-275d3c44-fbf4-4e98-8371-04481cd7a1f2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..dQzefo0ojos1AFezsHKRegIwMCS 34wh_VMp7uRZXqaA) zitadel’s log: ![image](https://private-user-images.githubusercontent.com /8185843/370968127-0a1d8117-30d2-45b2-8eb7-8c5bb5deee13.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..7fiXi9NSN0Hd1WbBzKBrMWdTXhMLy_HPwF9wzqd zuzE)

AUTH_URL and NEXT_AUTHURL delete one of them APP_URL is your lobechat domain name The redirect URL is your lobechat domain name +/api/auth/callback/zitadel AUTH_URL is your lobechat domain name +/api/auth

yincangshiwei commented 1 month ago

大佬求救,我是生产https部署的,配置如下: image 在lobe里输入完账号和密码,登录总是报错,lobe日志里面完全看不出具体是哪里有问题: image zitadel的日志: image

AUTH_URL和NEXT_AUTHURL删掉其中的一个 APP_URL是你的lobechat域名 重定向URL是你的lobechat域名+/api/auth/callback/zitadel AUTH_URL是你的lobechat域名+/api/auth

AUTH_URL和NEXT_AUTHURL删掉其中一个也不行,重定向应该是没问题的,不然点击登录/注册也不会出现zitadel的登录入口,AUTH_URL也是对的,检查了好几次。

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Boss please help, I am deploying https in production, the configuration is as follows: ![image](https://private-user-images.githubusercontent.com/8185843/370967734-fb57bc2c-05aa-4285-ab84-a1915329f8c2.png ?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..D7mDYzUdNEuAFSeUQv_XSqZu2ihEgcweGjQmx-qAaQI) After entering the account and password in lobe, an error always occurs when logging in. The specific problem cannot be seen in the lobe log: ![image](https://private-user- images.githubusercontent.com/8185843/370967975-275d3c44-fbf4-4e98-8371-04481cd7a1f2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..dQzefo0ojos1AFezsHKRegIwMCS 34wh_VMp7uRZXqaA) zitadel’s log: ![image](https://private-user-images.githubusercontent. com/8185843/370968127-0a1d8117-30d2-45b2-8eb7-8c5bb5deee13.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..7fiXi9NSN0Hd1WbBzKBrMWdTXhMLy_HPwF9w zqdzuzE)

Delete one of AUTH_URL and NEXT_AUTHURL. APP_URL is your lobechat domain name. Redirect URL is your lobechat domain name +/api/auth/callback/zitadel. AUTH_URL is your lobechat domain name +/api/auth.

Even deleting one of AUTH_URL and NEXT_AUTHURL won't work. The redirection should be fine, otherwise the zitadel login entrance will not appear when you click login/register. AUTH_URL is also correct. I checked it several times.

zhangleijun111 commented 1 month ago

用casdoor吧

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: yincangshiwei @.> 发送时间: 2024年9月26日 11:22 收件人: lobehub/lobe-chat @.> 抄送: zhangleijun111 @.>, Comment @.> 主题: Re: [lobehub/lobe-chat] [Request] 提供一个ZITADEL 身份验证服务本地部署参考 (Issue #4060)

大佬求救,我是生产https部署的,配置如下: 在lobe里输入完账号和密码,登录总是报错,lobe日志里面完全看不出具体是哪里有问题: zitadel的日志:

AUTH_URL和NEXT_AUTHURL删掉其中的一个 APP_URL是你的lobechat域名 重定向URL是你的lobechat域名+/api/auth/callback/zitadel AUTH_URL是你的lobechat域名+/api/auth

AUTH_URL和NEXT_AUTHURL删掉其中一个也不行,重定向应该是没问题的,不然点击登录/注册也不会出现zitadel的登录入口,AUTH_URL也是对的,检查了好几次。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

SpeedupMaster commented 1 month ago

lobechat报错显示NEXTAUTH的环境变量设置有问题,zitadel没有报错

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The error reported by lobechat shows that there is a problem with the environment variable setting of NEXTAUTH, but zitadel does not report an error.

SpeedupMaster commented 1 month ago

你把.env发我看下

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Send me the .env to take a look

yincangshiwei commented 1 month ago

你把.env发我看下

image

lobehubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Send me the .env to take a look

image

SpeedupMaster commented 1 month ago

你把.env发我看下

image

用的Neon Postgres吗,其他看着好像没问题