Closed Amandizz closed 4 days ago
👀 @Amandizz
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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
Hey @Amandizz! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue.
To resolve the issue of logto
automatically exiting after starting when using Docker Compose for lobe-chat-db
deployment, you should ensure that the database schema migration is correctly executed. Follow these steps to forcibly remove the database container and restart:
docker compose down # Stop services
sudo rm -rf ./data # Remove mounted database data
docker compose up -d # Restart
Ensure that your docker-compose.yml
file is correctly configured. Here is an example configuration for the logto
service:
logto:
image: svhd/logto
container_name: lobe-logto
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
environment:
- 'TRUST_PROXY_HEADER=1'
- 'PORT=${LOGTO_PORT}'
- 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto'
- 'ENDPOINT=http://localhost:${LOGTO_PORT}'
- 'ADMIN_ENDPOINT=http://localhost:3002'
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
This configuration ensures that the logto
service waits for the postgresql
service to be healthy before starting and runs the necessary database seed commands before starting the application [1][2].
To continue talking to Dosu, mention @dosu.
logto版本更新导致的,可以继续使用 svhd/logto:1.19.0 版本,不会报错
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Caused by logto version update, you can continue to use svhd/logto:1.19.0 version without error.
想骂人, @dosubot 差点让我数据丢失~
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I want to curse, @dosubot almost made me lose my data~
logto版本更新导致的,可以继续使用 svhd/logto:1.19.0 版本,不会报错
@SpeedupMaster 感谢~ 你说的对!
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
It is caused by logto version update. You can continue to use svhd/logto:1.19.0 version without error.
@SpeedupMaster Thanks~ You are right!
✅ @Amandizz
This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。
📦 Environment
Docker
📌 Version
27.1.2
💻 Operating System
Ubuntu
🌐 Browser
Chrome
🐛 Bug Description
lobe-chat-db使用compose线上部署,logto启动后自动退出(其他服务正常) 注:几天之前同样的操作,没有任何问题。就最近两天出现的这种问题。 报错信息:
info Seeding skipped npm notice npm notice New patch version of npm available! 10.8.2 -> 10.8.3 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3 npm notice To update run: npm install -g npm@10.8.3 npm notice
(node:44) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time (Use
node --trace-warnings ...
to show where the warning was created) cache warn No Redis client initialized, skipping pre error Found undeployed database alterations, you must deploy them first by npm run alteration deploy command.See https://docs.logto.io/docs/references/using-cli/database-alteration for reference.
index error Error while initializing app: index error Error: Undeployed database alterations found. at checkAlterationState (file:///etc/logto/packages/core/build/main-F72FFTZD.js:26444:9) at async Promise.all (index 0) at async checkPreconditions (file:///etc/logto/packages/core/build/main-F72FFTZD.js:26408:3) at async Promise.all (index 3) at async file:///etc/logto/packages/core/build/main-F72FFTZD.js:26480:3
📷 Recurrence Steps
No response
🚦 Expected Behavior
No response
📝 Additional Information
No response