发布应用 PostgreSQL PostGIS 扩展版
Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
40
apps/postgresql-postgis/16-3.5-alpine/data.yml
Normal file
40
apps/postgresql-postgis/16-3.5-alpine/data.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
additionalProperties:
|
||||||
|
formFields:
|
||||||
|
- default: "/home/postgres"
|
||||||
|
edit: true
|
||||||
|
envKey: POSTGRES_ROOT_PATH
|
||||||
|
labelZh: 数据持久化路径
|
||||||
|
labelEn: Data persistence path
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
- default: ""
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_PASSWORD
|
||||||
|
labelZh: Postgres 密码 (首次生效)
|
||||||
|
labelEn: Postgres Password (First Time)
|
||||||
|
required: true
|
||||||
|
random: true
|
||||||
|
rule: paramComplexity
|
||||||
|
type: password
|
||||||
|
- default: 5432
|
||||||
|
edit: true
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
labelZh: Postgres 端口
|
||||||
|
labelEn: Postgres Port
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_USER
|
||||||
|
labelZh: Postgres 用户(不建议改动)
|
||||||
|
labelEn: Postgres User
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_DB
|
||||||
|
labelZh: Postgres 数据库名称(不建议改动)
|
||||||
|
labelEn: Postgres Database Name
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
25
apps/postgresql-postgis/16-3.5-alpine/docker-compose.yml
Normal file
25
apps/postgresql-postgis/16-3.5-alpine/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgresql:
|
||||||
|
image: postgis/postgis:16-3.5-alpine
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${PANEL_APP_PORT_HTTP}:5432
|
||||||
|
env_file:
|
||||||
|
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||||
|
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||||
|
volumes:
|
||||||
|
- ${POSTGRES_ROOT_PATH}/data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
||||||
|
POSTGRES_INITDB_ARGS: "--data-checksums"
|
||||||
40
apps/postgresql-postgis/16-3.5/data.yml
Normal file
40
apps/postgresql-postgis/16-3.5/data.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
additionalProperties:
|
||||||
|
formFields:
|
||||||
|
- default: "/home/postgres"
|
||||||
|
edit: true
|
||||||
|
envKey: POSTGRES_ROOT_PATH
|
||||||
|
labelZh: 数据持久化路径
|
||||||
|
labelEn: Data persistence path
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
- default: ""
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_PASSWORD
|
||||||
|
labelZh: Postgres 密码 (首次生效)
|
||||||
|
labelEn: Postgres Password (First Time)
|
||||||
|
required: true
|
||||||
|
random: true
|
||||||
|
rule: paramComplexity
|
||||||
|
type: password
|
||||||
|
- default: 5432
|
||||||
|
edit: true
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
labelZh: Postgres 端口
|
||||||
|
labelEn: Postgres Port
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_USER
|
||||||
|
labelZh: Postgres 用户(不建议改动)
|
||||||
|
labelEn: Postgres User
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_DB
|
||||||
|
labelZh: Postgres 数据库名称(不建议改动)
|
||||||
|
labelEn: Postgres Database Name
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
25
apps/postgresql-postgis/16-3.5/docker-compose.yml
Normal file
25
apps/postgresql-postgis/16-3.5/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgresql:
|
||||||
|
image: postgis/postgis:16-3.5
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${PANEL_APP_PORT_HTTP}:5432
|
||||||
|
env_file:
|
||||||
|
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||||
|
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||||
|
volumes:
|
||||||
|
- ${POSTGRES_ROOT_PATH}/data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
||||||
|
POSTGRES_INITDB_ARGS: "--data-checksums"
|
||||||
0
apps/postgresql-postgis/16-3.5/envs/default.env
Normal file
0
apps/postgresql-postgis/16-3.5/envs/default.env
Normal file
0
apps/postgresql-postgis/16-3.5/envs/global.env
Normal file
0
apps/postgresql-postgis/16-3.5/envs/global.env
Normal file
0
apps/postgresql-postgis/16-3.5/scripts/init.sh
Normal file
0
apps/postgresql-postgis/16-3.5/scripts/init.sh
Normal file
0
apps/postgresql-postgis/16-3.5/scripts/uninstall.sh
Normal file
0
apps/postgresql-postgis/16-3.5/scripts/uninstall.sh
Normal file
0
apps/postgresql-postgis/16-3.5/scripts/upgrade.sh
Normal file
0
apps/postgresql-postgis/16-3.5/scripts/upgrade.sh
Normal file
40
apps/postgresql-postgis/17-3.5-alpine/data.yml
Normal file
40
apps/postgresql-postgis/17-3.5-alpine/data.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
additionalProperties:
|
||||||
|
formFields:
|
||||||
|
- default: "/home/postgres"
|
||||||
|
edit: true
|
||||||
|
envKey: POSTGRES_ROOT_PATH
|
||||||
|
labelZh: 数据持久化路径
|
||||||
|
labelEn: Data persistence path
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
- default: ""
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_PASSWORD
|
||||||
|
labelZh: Postgres 密码 (首次生效)
|
||||||
|
labelEn: Postgres Password (First Time)
|
||||||
|
required: true
|
||||||
|
random: true
|
||||||
|
rule: paramComplexity
|
||||||
|
type: password
|
||||||
|
- default: 5432
|
||||||
|
edit: true
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
labelZh: Postgres 端口
|
||||||
|
labelEn: Postgres Port
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_USER
|
||||||
|
labelZh: Postgres 用户(不建议改动)
|
||||||
|
labelEn: Postgres User
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_DB
|
||||||
|
labelZh: Postgres 数据库名称(不建议改动)
|
||||||
|
labelEn: Postgres Database Name
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
25
apps/postgresql-postgis/17-3.5-alpine/docker-compose.yml
Normal file
25
apps/postgresql-postgis/17-3.5-alpine/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgresql:
|
||||||
|
image: postgis/postgis:17-3.5-alpine
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${PANEL_APP_PORT_HTTP}:5432
|
||||||
|
env_file:
|
||||||
|
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||||
|
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||||
|
volumes:
|
||||||
|
- ${POSTGRES_ROOT_PATH}/data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
||||||
|
POSTGRES_INITDB_ARGS: "--data-checksums"
|
||||||
40
apps/postgresql-postgis/17-3.5/data.yml
Normal file
40
apps/postgresql-postgis/17-3.5/data.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
additionalProperties:
|
||||||
|
formFields:
|
||||||
|
- default: "/home/postgres"
|
||||||
|
edit: true
|
||||||
|
envKey: POSTGRES_ROOT_PATH
|
||||||
|
labelZh: 数据持久化路径
|
||||||
|
labelEn: Data persistence path
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
- default: ""
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_PASSWORD
|
||||||
|
labelZh: Postgres 密码 (首次生效)
|
||||||
|
labelEn: Postgres Password (First Time)
|
||||||
|
required: true
|
||||||
|
random: true
|
||||||
|
rule: paramComplexity
|
||||||
|
type: password
|
||||||
|
- default: 5432
|
||||||
|
edit: true
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
labelZh: Postgres 端口
|
||||||
|
labelEn: Postgres Port
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_USER
|
||||||
|
labelZh: Postgres 用户(不建议改动)
|
||||||
|
labelEn: Postgres User
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
|
- default: "postgres"
|
||||||
|
edit: false
|
||||||
|
envKey: POSTGRES_DB
|
||||||
|
labelZh: Postgres 数据库名称(不建议改动)
|
||||||
|
labelEn: Postgres Database Name
|
||||||
|
required: false
|
||||||
|
type: text
|
||||||
25
apps/postgresql-postgis/17-3.5/docker-compose.yml
Normal file
25
apps/postgresql-postgis/17-3.5/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgresql:
|
||||||
|
image: postgis/postgis:17-3.5
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
labels:
|
||||||
|
createdBy: "Apps"
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${PANEL_APP_PORT_HTTP}:5432
|
||||||
|
env_file:
|
||||||
|
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||||
|
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||||
|
volumes:
|
||||||
|
- ${POSTGRES_ROOT_PATH}/data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
||||||
|
POSTGRES_INITDB_ARGS: "--data-checksums"
|
||||||
0
apps/postgresql-postgis/17-3.5/envs/default.env
Normal file
0
apps/postgresql-postgis/17-3.5/envs/default.env
Normal file
0
apps/postgresql-postgis/17-3.5/envs/global.env
Normal file
0
apps/postgresql-postgis/17-3.5/envs/global.env
Normal file
29
apps/postgresql-postgis/17-3.5/scripts/init.sh
Normal file
29
apps/postgresql-postgis/17-3.5/scripts/init.sh
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f .env ]; then
|
||||||
|
source .env
|
||||||
|
|
||||||
|
# setup-1 add default values
|
||||||
|
CURRENT_DIR=$(pwd)
|
||||||
|
sed -i '/^ENV_FILE=/d' .env
|
||||||
|
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||||
|
sed -i '/^APP_ENV_FILE=/d' .env
|
||||||
|
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||||
|
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||||
|
echo "APP_ENV_FILE=${CURRENT_DIR}/envs/outline.env" >> .env
|
||||||
|
|
||||||
|
# setup-2 remove empty values
|
||||||
|
sed -i '/^.*=""/d' .env
|
||||||
|
|
||||||
|
# setup-3 update directory permissions
|
||||||
|
mkdir -p "$OUTLINE_ROOT_PATH"
|
||||||
|
mkdir -p "$OUTLINE_ROOT_PATH/data"
|
||||||
|
|
||||||
|
chown -R 1001:1001 "$OUTLINE_ROOT_PATH"
|
||||||
|
chmod -R 1777 "$OUTLINE_ROOT_PATH"
|
||||||
|
|
||||||
|
echo "Check Finish."
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Error: .env file not found."
|
||||||
|
fi
|
||||||
10
apps/postgresql-postgis/17-3.5/scripts/uninstall.sh
Normal file
10
apps/postgresql-postgis/17-3.5/scripts/uninstall.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f .env ]; then
|
||||||
|
source .env
|
||||||
|
|
||||||
|
echo "Check Finish."
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Error: .env file not found."
|
||||||
|
fi
|
||||||
29
apps/postgresql-postgis/17-3.5/scripts/upgrade.sh
Normal file
29
apps/postgresql-postgis/17-3.5/scripts/upgrade.sh
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f .env ]; then
|
||||||
|
source .env
|
||||||
|
|
||||||
|
# setup-1 add default values
|
||||||
|
CURRENT_DIR=$(pwd)
|
||||||
|
sed -i '/^ENV_FILE=/d' .env
|
||||||
|
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||||
|
sed -i '/^APP_ENV_FILE=/d' .env
|
||||||
|
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||||
|
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||||
|
echo "APP_ENV_FILE=${CURRENT_DIR}/envs/outline.env" >> .env
|
||||||
|
|
||||||
|
# setup-2 remove empty values
|
||||||
|
sed -i '/^.*=""/d' .env
|
||||||
|
|
||||||
|
# setup-3 update directory permissions
|
||||||
|
mkdir -p "$OUTLINE_ROOT_PATH"
|
||||||
|
mkdir -p "$OUTLINE_ROOT_PATH/data"
|
||||||
|
|
||||||
|
chown -R 1001:1001 "$OUTLINE_ROOT_PATH"
|
||||||
|
chmod -R 1777 "$OUTLINE_ROOT_PATH"
|
||||||
|
|
||||||
|
echo "Check Finish."
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Error: .env file not found."
|
||||||
|
fi
|
||||||
54
apps/postgresql-postgis/README.md
Normal file
54
apps/postgresql-postgis/README.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# PostgreSQL (PostGIS)
|
||||||
|
|
||||||
|
### PostgreSQL:世界上最先进的开源关系数据库
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## PostGIS 扩展
|
||||||
|
|
||||||
|
PostGIS 通过添加对存储、索引和查询地理空间数据的支持来扩展 PostgreSQL 关系数据库的功能。
|
||||||
|
|
||||||
|
## 简介
|
||||||
|
|
||||||
|
PostgreSQL 是一个功能强大的开源对象关系型数据库系统,它使用并扩展了 SQL 语言,并结合了多种功能,可以安全地存储和扩展最复杂的数据工作负载。PostgreSQL
|
||||||
|
起源于 1986 年加州大学伯克利分校的 POSTGRES 项目,在核心平台上已有超过 35 年的活跃开发历史。
|
||||||
|
|
||||||
|
PostgreSQL 因其成熟的架构、可靠性、数据完整性、强大的功能集、可扩展性,以及该软件背后的开源社区为持续提供高性能和创新解决方案所做出的奉献而赢得了良好的声誉。
|
||||||
|
PostgreSQL 可在所有主流操作系统上运行,自 2001 年以来一直符合 ACID 标准,并拥有强大的附加功能,如广受欢迎的 PostGIS
|
||||||
|
地理空间数据库扩展器。因此,PostgreSQL 成为许多人和组织首选的开源关系数据库也就不足为奇了。
|
||||||
|
|
||||||
|
开始使用PostgreSQL从未如此简单--选择一个你想建立的项目,让PostgreSQL安全稳健地存储你的数据。
|
||||||
|
|
||||||
|
### 为什么使用 PostgreSQL
|
||||||
|
|
||||||
|
PostgreSQL 具有许多功能,旨在帮助开发人员构建应用程序,帮助管理员保护数据完整性和构建容错环境,并帮助您管理数据,无论数据集大小。除了免费和开源之外,PostgreSQL
|
||||||
|
还具有高度可扩展性。例如,您可以定义自己的数据类型,创建自定义函数,甚至可以使用不同的编程语言编写代码,而无需重新编译数据库!
|
||||||
|
|
||||||
|
在不违背传统功能或可能导致架构决策失误的情况下,PostgreSQL 会尽量符合 SQL 标准。SQL 标准所要求的许多功能都得到了支持,尽管有时语法或功能略有不同。
|
||||||
|
随着时间的推移,有望进一步实现一致性。截至 2023 年 9 月发布的第 16 版,PostgreSQL 至少符合 SQL:2023 核心一致性 179 个强制功能中的
|
||||||
|
170 个。
|
||||||
|
截至目前,还没有关系型数据库完全符合这一标准。
|
||||||
|
|
||||||
|
## 版本选择
|
||||||
|
|
||||||
|
- `vectors` - 内置 vectors 插件。
|
||||||
|
|
||||||
|
+ 插件名称:vectors
|
||||||
|
|
||||||
|
+ 插件描述:vectors 插件用于存储和查询矢量数据,如地理坐标、几何图形等。
|
||||||
|
|
||||||
|
+ 插件链接:[https://github.com/tensorchord/pgvecto.rs](https://github.com/tensorchord/pgvecto.rs)
|
||||||
|
|
||||||
|
- `alpine` - 基于 Alpine Linux 发行版。
|
||||||
|
|
||||||
|
+ 精简版 PostgreSQL,基于 Alpine Linux 发行版,提供了更小的镜像体积和更快的启动速度。
|
||||||
|
|
||||||
|
- `{version}` 默认版
|
||||||
|
|
||||||
|
+ 官方默认 PostgreSQL 版本,基于 Debian Linux 发行版。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|

|
||||||
14
apps/postgresql-postgis/data.yml
Normal file
14
apps/postgresql-postgis/data.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
additionalProperties:
|
||||||
|
key: postgresql-postgis
|
||||||
|
name: PostgreSQL (PostGIS)
|
||||||
|
tags:
|
||||||
|
- Database
|
||||||
|
- Local
|
||||||
|
shortDescZh: 开源关系型数据库
|
||||||
|
shortDescEn: Open Source Relational Database
|
||||||
|
type: runtime
|
||||||
|
crossVersionUpdate: false
|
||||||
|
limit: 0
|
||||||
|
website: https://www.postgresql.org/
|
||||||
|
github: https://github.com/postgres/postgres/
|
||||||
|
document: https://www.postgresql.org/docs/
|
||||||
BIN
apps/postgresql-postgis/logo.png
Normal file
BIN
apps/postgresql-postgis/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user