From 6f64e67538f314b5d342f01f72f963f992e088d5 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 18 Aug 2025 21:42:44 +0800 Subject: [PATCH] fix dockerfile --- docker/entrypoint.sh | 4 ++-- docker/{postgresql => }/pg_hba.conf | 0 docker/{postgresql => }/postgresql.conf.template | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename docker/{postgresql => }/pg_hba.conf (100%) rename docker/{postgresql => }/postgresql.conf.template (100%) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 9a234efc..71f37d3a 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -267,11 +267,11 @@ if [ "${DB_TYPE:-sqlite}" = "postgresql" ]; then # 配置PostgreSQL INFO "复制PostgreSQL配置文件..." - cp /app/docker/postgresql/pg_hba.conf "${POSTGRESQL_DATA_DIR}/pg_hba.conf" + cp /app/docker/pg_hba.conf "${POSTGRESQL_DATA_DIR}/pg_hba.conf" # 使用envsubst处理postgresql.conf模板 export POSTGRESQL_LOG_DIR="${POSTGRESQL_LOG_DIR}" - envsubst '${DB_POSTGRESQL_PORT}${POSTGRESQL_LOG_DIR}' < /app/docker/postgresql/postgresql.conf.template > "${POSTGRESQL_DATA_DIR}/postgresql.conf" + envsubst '${DB_POSTGRESQL_PORT}${POSTGRESQL_LOG_DIR}' < /app/docker/postgresql.conf.template > "${POSTGRESQL_DATA_DIR}/postgresql.conf" # 设置正确的权限 chown postgres:postgres "${POSTGRESQL_DATA_DIR}/pg_hba.conf" "${POSTGRESQL_DATA_DIR}/postgresql.conf" diff --git a/docker/postgresql/pg_hba.conf b/docker/pg_hba.conf similarity index 100% rename from docker/postgresql/pg_hba.conf rename to docker/pg_hba.conf diff --git a/docker/postgresql/postgresql.conf.template b/docker/postgresql.conf.template similarity index 100% rename from docker/postgresql/postgresql.conf.template rename to docker/postgresql.conf.template