1
0

feat:添加slink到列表

This commit is contained in:
okxlin
2024-05-11 02:44:45 +08:00
parent 8412e29189
commit 08383529ad
9 changed files with 402 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
CONTAINER_NAME="slink"
DATA_PATH="./data"
IMAGE_MAX_SIZE="15M"
IMAGE_STRIP_EXIF_METADATA="true"
ORIGIN="https://your-domain.com"
PANEL_APP_PORT_HTTP="40236"
SMB_HOST=""
SMB_PASSWORD=""
SMB_SHARE=""
SMB_USERNAME=""
STORAGE_PROVIDER="local"
USER_ALLOW_UNAUTHENTICATED_ACCESS="true"
USER_APPROVAL_REQUIRED="true"
USER_PASSWORD_MIN_LENGTH="6"
USER_PASSWORD_REQUIREMENTS="15"

121
apps/slink/latest/data.yml Normal file
View File

@@ -0,0 +1,121 @@
additionalProperties:
formFields:
- default: 40236
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: DATA_PATH
labelEn: Data folder path
labelZh: 数据文件夹路径
required: true
type: text
- default: "https://your-domain.com"
envKey: ORIGIN
labelEn: External URL (Only https environments can register and login, reverse proxy is required)
labelZh: 外部访问地址 (只有 https 环境才能注册登录,需要反向代理)
required: true
type: text
edit: true
- default: "true"
envKey: USER_APPROVAL_REQUIRED
labelEn: Whether to require user approval before they can upload images
labelZh: 是否需要用户批准才能上传图像
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
edit: true
- default: "true"
envKey: USER_ALLOW_UNAUTHENTICATED_ACCESS
labelEn: Allow Unauthenticated Access
labelZh: 允许未认证访问
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
edit: true
- default: "6"
envKey: USER_PASSWORD_MIN_LENGTH
labelEn: User Password Minimum Length
labelZh: 用户密码最小长度
required: true
type: number
edit: true
- default: "15"
envKey: USER_PASSWORD_REQUIREMENTS
labelEn: User Password Requirements (Sum of the following options:1-numbers, 2-lowercase, 4-uppercase, 8-special characters)
labelZh: 用户密码要求 (以下选项的总和1-数字、2-小写、4-大写、8-特殊字符)
required: true
type: number
edit: true
- default: "15M"
envKey: IMAGE_MAX_SIZE
labelEn: Image Maximum Size (no more than 50M)
labelZh: 图片最大尺寸(不超过50M)
required: true
type: text
edit: true
- default: "true"
envKey: IMAGE_STRIP_EXIF_METADATA
labelEn: Strip EXIF Metadata
labelZh: 剥离 EXIF 元数据
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
edit: true
- default: "local"
envKey: STORAGE_PROVIDER
labelEn: Storage Provider
labelZh: 存储提供商
required: true
type: select
values:
- label: Local
value: "local"
- label: SMB
value: "smb"
edit: true
- default: ""
envKey: SMB_HOST
labelEn: SMB Host
labelZh: SMB 主机
required: false
type: text
edit: true
- default: ""
envKey: SMB_USERNAME
labelEn: SMB Username
labelZh: SMB 用户名
required: false
type: text
edit: true
- default: ""
envKey: SMB_PASSWORD
labelEn: SMB Password
labelZh: SMB 密码
required: false
type: password
edit: true
- default: ""
envKey: SMB_SHARE
labelEn: SMB Share
labelZh: SMB 共享
required: false
type: text
edit: true

View File

@@ -0,0 +1,32 @@
version: '3'
services:
slink:
image: anirdev/slink:latest
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:3000"
volumes:
- ${DATA_PATH}/var/data:/app/var/data
- ${DATA_PATH}/images:/app/slink/images
environment:
- ORIGIN=${ORIGIN}
- USER_APPROVAL_REQUIRED=${USER_APPROVAL_REQUIRED}
- USER_ALLOW_UNAUTHENTICATED_ACCESS=${USER_ALLOW_UNAUTHENTICATED_ACCESS}
- USER_PASSWORD_MIN_LENGTH=${USER_PASSWORD_MIN_LENGTH}
- USER_PASSWORD_REQUIREMENTS=${USER_PASSWORD_REQUIREMENTS}
- IMAGE_MAX_SIZE=${IMAGE_MAX_SIZE}
- IMAGE_STRIP_EXIF_METADATA=${IMAGE_STRIP_EXIF_METADATA}
- STORAGE_PROVIDER=${STORAGE_PROVIDER}
- SMB_HOST=${SMB_HOST}
- SMB_USERNAME=${SMB_USERNAME}
- SMB_PASSWORD=${SMB_PASSWORD}
- SMB_SHARE=${SMB_SHARE}
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true