# docker-config **Repository Path**: mars-config/docker-config ## Basic Information - **Project Name**: docker-config - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-25 - **Last Updated**: 2026-04-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 1. 简介 安装 PostgreSQL 18 + PGVector # 2. 使用 ## 2.1 服务管理 ```shell # 启动容器(后台运行) docker-compose up -d # 查看运行状态 docker-compose ps # 查看日志 docker-compose logs -f # 停止服务(保留数据) docker-compose stop # 停止并删除容器、网络(保留数据卷) docker-compose down # 停止并删除所有资源(包括数据卷,数据会丢失!) docker-compose down -v # 重启服务 docker-compose restart # 查看服务状态 docker-compose ``` ## 2.2 连接数据库 ```shell # 通过容器内部连接 docker exec -it pgvector-postgres psql -U postgres # 或从外部连接(如果宿主机安装了 psql) psql -h localhost -p 5432 -U postgres ```