docker compose up -d后,docker-db-1 无法正常 Running,总是重启 Restart ...

打印 上一主题 下一主题

主题 888|帖子 888|积分 2664


启动后localhost/install 页面不绝的转圈,无法输入admin管理员暗码。


日志报错如下:
  1. 2024-12-25 10:11:46 db-1          | The files belonging to this database system will be owned by user "postgres".
  2. 2024-12-25 10:11:46 db-1          | This user must also own the server process.
  3. 2024-12-25 10:11:46 db-1          |
  4. 2024-12-25 10:11:46 db-1          | The database cluster will be initialized with locale "en_US.utf8".
  5. 2024-12-25 10:11:46 db-1          | The default database encoding has accordingly been set to "UTF8".
  6. 2024-12-25 10:11:46 db-1          | The default text search configuration will be set to "english".
  7. 2024-12-25 10:11:46 db-1          |
  8. 2024-12-25 10:11:46 db-1          | Data page checksums are disabled.
  9. 2024-12-25 10:11:46 db-1          |
  10. 2024-12-25 10:11:46 db-1          | initdb: error: could not change permissions of directory "/var/lib/postgresql/data/pgdata": Operation not permitted
  11. 2024-12-25 10:11:46 db-1          | fixing permissions on existing directory /var/lib/postgresql/data/pgdata ... 2024-12-25T02:12:46.866162406Z chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
  12. 2024-12-25 10:12:46 db-1          | The files belonging to this database system will be owned by user "postgres".
  13. 2024-12-25 10:12:46 db-1          | This user must also own the server process.
  14. 2024-12-25 10:12:46 db-1          |
  15. 2024-12-25 10:12:46 db-1          | The database cluster will be initialized with locale "en_US.utf8".
  16. 2024-12-25 10:12:46 db-1          | The default database encoding has accordingly been set to "UTF8".
  17. 2024-12-25 10:12:46 db-1          | The default text search configuration will be set to "english".
  18. 2024-12-25 10:12:46 db-1          |
  19. 2024-12-25 10:12:46 db-1          | Data page checksums are disabled.
  20. 2024-12-25 10:12:46 db-1          |
  21. 2024-12-25 10:12:46 db-1          | initdb: error: could not change permissions of directory "/var/lib/postgresql/data/pgdata": Operation not permitted
  22. 2024-12-25 10:12:46 db-1          | fixing permissions on existing directory /var/lib/postgresql/data/pgdata ... 2024-12-25T02:13:47.405758077Z chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
  23. 2024-12-25 10:13:47 db-1          | The files belonging to this database system will be owned by user "postgres".
  24. 2024-12-25 10:13:47 db-1          | This user must also own the server process.
  25. 2024-12-25 10:13:47 db-1          |
  26. 2024-12-25 10:13:47 db-1          | The database cluster will be initialized with locale "en_US.utf8".
  27. 2024-12-25 10:13:47 db-1          | The default database encoding has accordingly been set to "UTF8".
  28. 2024-12-25 10:13:47 db-1          | The default text search configuration will be set to "english".
  29. 2024-12-25 10:13:47 db-1          |
  30. 2024-12-25 10:13:47 db-1          | Data page checksums are disabled.
  31. 2024-12-25 10:13:47 db-1          |
  32. 2024-12-25 10:13:47 db-1          | initdb: error: could not change permissions of directory "/var/lib/postgresql/data/pgdata": Operation not permitted
  33. 2024-12-25 10:13:48 sandbox-1     | [GIN] 2024/12/25 - 02:13:48 | 200 |      27.609µs |             ::1 | GET      "/health"
复制代码
1.在 dify/docker 文件夹下找到 docker-compose.yaml

2.找到文件夹中的 volumes/db/data ,更换为 postgres-data

3.最后在末尾,添加上 postgres-data

使用 docker compose up -d 启动容器
  1. docker compose up -d
复制代码
输入 docker compose ps可以看到运行的服务
  1. docker compose ps
复制代码

欣赏器上,输入 http://localhost即可访问

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

吴旭华

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表