fix: 修正 PostgreSQL 18 数据卷挂载路径#31
Open
F1sh2712 wants to merge 1 commit intoInvolutionHell:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
修正
docker-compose.yml中 postgres 服务的数据卷挂载路径,从/var/lib/postgresql/data改为/var/lib/postgresql,以兼容 PostgreSQL 18 的官方镜像规范。Why
PostgreSQL 18 官方 Docker 镜像修改了数据存储路径规范,从
/var/lib/postgresql/data改为/var/lib/postgresql/<major>/docker(由镜像内部自动创建版本子目录)。当前docker-compose.yml仍按旧规范挂载到/var/lib/postgresql/data,导致容器启动时检测到挂载点配置不匹配,直接拒绝启动以防数据损坏容器进入无限重启循环,新贡献者按 README 走会被卡死。
参考:PostgreSQL Docker 官方说明
Closes #25
How
修改
docker-compose.yml中 postgres 服务的 volumes 配置:已经在用旧版 docker-compose.yml 跑过 postgres 的开发者,本地的
involution-postgres-data数据卷是按旧路径生成的,合并本 PR 后必须重建数据卷才能正常启动:docker compose down -v会删除involution-postgres-data卷里的所有本地数据。本地开发数据通常无关紧要(种子数据会由 init.sql 重建),但若本地有重要测试数据,请先备份。