This commit is contained in:
2026-01-02 16:02:51 +08:00
parent 5d54ac1cd4
commit 2d19ee784b
4 changed files with 3 additions and 8 deletions

View File

@@ -6,7 +6,7 @@
# ------------------------------ # ------------------------------
# PostgreSQL 版本 # PostgreSQL 版本
# ------------------------------ # ------------------------------
POSTGRES_VERSION=16 POSTGRES_VERSION=latest
# ------------------------------ # ------------------------------
# 端口配置 # 端口配置

View File

@@ -4,11 +4,8 @@
services: services:
postgres: postgres:
build: image: urban-lifeline-pg:${POSTGRES_VERSION:-latest}
context: . container_name: urban-lifeline-pg
dockerfile: Dockerfile.pg
image: urban-lifeline-postgres:${POSTGRES_VERSION:-16}
container_name: urban-lifeline-postgres
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- .env - .env

View File

@@ -18,7 +18,6 @@ CREATE DATABASE urban_lifeline
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- UUID 支持 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- UUID 支持
CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- 文本搜索支持 CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- 文本搜索支持
CREATE EXTENSION IF NOT EXISTS "btree_gist"; -- GiST 索引支持 CREATE EXTENSION IF NOT EXISTS "btree_gist"; -- GiST 索引支持
CREATE EXTENSION IF NOT EXISTS "vector"; -- 向量
-- 设置搜索路径(可选,但建议设置) -- 设置搜索路径(可选,但建议设置)
-- ALTER DATABASE urban-lifeline SET search_path TO sys, public; -- ALTER DATABASE urban-lifeline SET search_path TO sys, public;

View File

@@ -18,7 +18,6 @@ CREATE DATABASE urban_lifeline
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- UUID 支持 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- UUID 支持
CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- 文本搜索支持 CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- 文本搜索支持
CREATE EXTENSION IF NOT EXISTS "btree_gist"; -- GiST 索引支持 CREATE EXTENSION IF NOT EXISTS "btree_gist"; -- GiST 索引支持
CREATE EXTENSION IF NOT EXISTS "vector"; -- 向量
-- 设置搜索路径(可选,但建议设置) -- 设置搜索路径(可选,但建议设置)
-- ALTER DATABASE urban-lifeline SET search_path TO sys, public; -- ALTER DATABASE urban-lifeline SET search_path TO sys, public;