mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-25 09:38:47 +08:00
feat: 优化 MinIO 安装包
This commit is contained in:
parent
1b838b65f5
commit
73554d0166
@ -1,12 +1,5 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/minio"
|
||||
edit: true
|
||||
envKey: MINIO_ROOT_PATH
|
||||
labelEn: Data persistence root path
|
||||
labelZh: 数据持久化 根路径
|
||||
required: true
|
||||
type: text
|
||||
- default: minio
|
||||
envKey: PANEL_MINIO_ROOT_USER
|
||||
labelEn: User
|
||||
@ -23,23 +16,25 @@ additionalProperties:
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: "12h"
|
||||
envKey: MINIO_BROWSER_SESSION_DURATION
|
||||
labelEn: Session duration
|
||||
labelZh: 会话持续时间 (s/秒 m/分钟 h/小时 d/天)
|
||||
required: true
|
||||
type: text
|
||||
- default: "9001"
|
||||
- default: 9000
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
type: text
|
||||
- default: "9000"
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 9001
|
||||
envKey: PANEL_APP_PORT_API
|
||||
labelEn: Port
|
||||
labelZh: API 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "12h"
|
||||
envKey: MINIO_BROWSER_SESSION_DURATION
|
||||
labelEn: Session duration
|
||||
labelZh: 会话持续时间 (s/秒 m/分钟 h/小时 d/天)
|
||||
required: true
|
||||
type: text
|
||||
- default: "on"
|
||||
envKey: MINIO_BROWSER
|
||||
|
@ -1,9 +1,4 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2024-02-26T09-33-48Z
|
||||
@ -26,15 +21,18 @@ services:
|
||||
max-size: "5M"
|
||||
max-file: "10"
|
||||
driver: json-file
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./certs:/root/.minio/certs
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- ${MINIO_ROOT_PATH}/data:/data
|
||||
- ${MINIO_ROOT_PATH}/certs:/root/.minio/certs
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
1panel-network:
|
||||
external: true
|
@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
mkdir -p "$MINIO_ROOT_PATH"
|
||||
|
||||
mkdir -p "$MINIO_ROOT_PATH/data"
|
||||
mkdir -p "$MINIO_ROOT_PATH/certs"
|
||||
|
||||
echo "Directories set successfully."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
exit 1
|
||||
fi
|
@ -1,18 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -f ./.env ]]; then
|
||||
source .env
|
||||
mkdir -p "$MINIO_ROOT_PATH"
|
||||
mkdir -p "$MINIO_ROOT_PATH/data"
|
||||
mkdir -p "$MINIO_ROOT_PATH/certs"
|
||||
|
||||
if grep -q "MINIO_ROOT_PATH" ./.env; then
|
||||
echo "MINIO_ROOT_PATH 已存在"
|
||||
else
|
||||
echo 'MINIO_ROOT_PATH="/home/minio"' >> ./.env
|
||||
echo 'Copy data to /home/minio'
|
||||
cp -r ./data /home/minio
|
||||
fi
|
||||
|
||||
if grep -q "MINIO_BROWSER_SESSION_DURATION" ./.env; then
|
||||
echo "MINIO_BROWSER_SESSION_DURATION 已存在"
|
||||
@ -20,7 +8,7 @@ if [[ -f ./.env ]]; then
|
||||
echo 'MINIO_BROWSER_SESSION_DURATION="12h"' >> ./.env
|
||||
fi
|
||||
|
||||
if grep -q "MINIO_BROWSER" ./.env; then
|
||||
if grep -q "MINIO_BROWSER=" ./.env; then
|
||||
echo "MINIO_BROWSER 已存在"
|
||||
else
|
||||
echo 'MINIO_BROWSER="on"' >> ./.env
|
||||
|
Loading…
Reference in New Issue
Block a user