From a03b08e767c711647e34952bba029d19881af828 Mon Sep 17 00:00:00 2001 From: okxlin Date: Sat, 11 May 2024 02:44:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0slink=E5=88=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/slink/1.1.0/.env.sample | 15 ++++ apps/slink/1.1.0/data.yml | 121 +++++++++++++++++++++++++++ apps/slink/1.1.0/docker-compose.yml | 32 +++++++ apps/slink/README.md | 47 +++++++++++ apps/slink/data.yml | 19 +++++ apps/slink/latest/.env.sample | 15 ++++ apps/slink/latest/data.yml | 121 +++++++++++++++++++++++++++ apps/slink/latest/docker-compose.yml | 32 +++++++ apps/slink/logo.png | Bin 0 -> 4999 bytes 9 files changed, 402 insertions(+) create mode 100644 apps/slink/1.1.0/.env.sample create mode 100644 apps/slink/1.1.0/data.yml create mode 100644 apps/slink/1.1.0/docker-compose.yml create mode 100644 apps/slink/README.md create mode 100644 apps/slink/data.yml create mode 100644 apps/slink/latest/.env.sample create mode 100644 apps/slink/latest/data.yml create mode 100644 apps/slink/latest/docker-compose.yml create mode 100644 apps/slink/logo.png diff --git a/apps/slink/1.1.0/.env.sample b/apps/slink/1.1.0/.env.sample new file mode 100644 index 00000000..6a99a430 --- /dev/null +++ b/apps/slink/1.1.0/.env.sample @@ -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" diff --git a/apps/slink/1.1.0/data.yml b/apps/slink/1.1.0/data.yml new file mode 100644 index 00000000..20bca46d --- /dev/null +++ b/apps/slink/1.1.0/data.yml @@ -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 diff --git a/apps/slink/1.1.0/docker-compose.yml b/apps/slink/1.1.0/docker-compose.yml new file mode 100644 index 00000000..6c5f625c --- /dev/null +++ b/apps/slink/1.1.0/docker-compose.yml @@ -0,0 +1,32 @@ +version: '3' +services: + slink: + image: anirdev/slink:v1.1.0 + 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 diff --git a/apps/slink/README.md b/apps/slink/README.md new file mode 100644 index 00000000..515b9270 --- /dev/null +++ b/apps/slink/README.md @@ -0,0 +1,47 @@ +# 使用说明 + +必须要开启`https`的情况下才能正常注册登录账号。 + +按照要求创建账号,例如邮箱`admin@localhost.com`, + +如果创建账号正常,则会提示除了邮箱外还可以复制对应`uuid`, + +那么则需要执行相关命令激活此账号。 + +- 1. 宿主机执行的方式 +``` +# 邮箱方式 +docker exec -it slink slink user:activate --email=admin@localhost.com +``` +``` +# uuid 方式 +docker exec -it slink slink user:activate --uuid= +``` + +- 2. 容器管理页面连接容器终端执行的方式 +``` +# 邮箱方式 +slink user:activate --email=admin@localhost.com +``` +``` +# uuid 方式 +slink user:activate --uuid= +``` + +- 3. 有得到终端返回信息例如以下,则表示账号激活成功,可以正常登录了。 + +``` +User `admin@localhost.com` has been activated ✓ +``` + +*** +# Slink: Image Sharing Platform + +![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/andrii-kryvoviaz/slink/release.yml?logo=github) +![Docker Image Version (latest semver)](https://img.shields.io/docker/v/anirdev/slink?color=blue) +![Docker Pulls](https://img.shields.io/docker/pulls/anirdev/slink?logo=docker) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/andrii-kryvoviaz/slink/blob/main/LICENSE) + +**Slink** is a self-hosted image sharing platform built with [Symfony](https://symfony.com/) and [SvelteKit](https://kit.svelte.dev/)️. + +Solves the problem of sharing images with friends, family, and colleagues without relying on third-party services. It also offers a platform for artists to share their work with the community. Additionally, developers may find it useful for self-hosting screenshots of personal projects, which can then be used on GitHub, portfolios, blogs, etc. diff --git a/apps/slink/data.yml b/apps/slink/data.yml new file mode 100644 index 00000000..5abda4e3 --- /dev/null +++ b/apps/slink/data.yml @@ -0,0 +1,19 @@ +name: Slink +tags: + - 工具 +title: 图像共享平台(图床) +description: 图像共享平台(图床) +additionalProperties: + key: slink + name: Slink + tags: + - Tool + shortDescZh: 图像共享平台(图床) + shortDescEn: Image Sharing Platform + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://github.com/andrii-kryvoviaz/slink + github: https://github.com/andrii-kryvoviaz/slink + document: https://github.com/andrii-kryvoviaz/slink diff --git a/apps/slink/latest/.env.sample b/apps/slink/latest/.env.sample new file mode 100644 index 00000000..6a99a430 --- /dev/null +++ b/apps/slink/latest/.env.sample @@ -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" diff --git a/apps/slink/latest/data.yml b/apps/slink/latest/data.yml new file mode 100644 index 00000000..20bca46d --- /dev/null +++ b/apps/slink/latest/data.yml @@ -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 diff --git a/apps/slink/latest/docker-compose.yml b/apps/slink/latest/docker-compose.yml new file mode 100644 index 00000000..3c203178 --- /dev/null +++ b/apps/slink/latest/docker-compose.yml @@ -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 diff --git a/apps/slink/logo.png b/apps/slink/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..83308032794e2c6863c299610f8209af1c6191ec GIT binary patch literal 4999 zcmV;26L{>2P)eJoo(9`9|)8eYY+pps2pVQ#fy4rxt-Ivqg#IDkKe3r`M>Y16VMrxv>hQNJ* zpO&S=m6^1CX}p)B(Q%Q$i_F`InYyj5&Q5=@PGW&vcamjgi-o1gx4_q;ow?q~;&imr zx0AlE`DK%ZiE4jd8${Xs>*)&1K8pW5eBK$KYee-X$wfigU?hz}z@# zy(TVHF!=LPvf%LUblTd1AcWW4hXua>-*z zkuFb;MvllcH*PXMYiG{hX1d%;n9Zhe%4f0JyK%@uhsIK;(@&z&J$%D+me_ZY);o8= zHe<0^wAeCOoTe;geX0xGWvw4oxGhwWRSE8bD%SuXzz;DS#N`tOyy&NM& z5h`F07(uUY#YwZ)p=G!wS+F=>twyTMX>Y=Kr{!P5;2t`4E-rErLU0=!T^u4+aUB%K{zTuU8)<=iL98sxVIfy1BWO=;qfwS(iUcN9$a|}0W2M#q<$JvEy z$BCorx@5*WDsc)OS75W?YI?_`X2UXy!X$CMDr35TM41{xlv7WW96p14joV&+(T-)l zN-up3Ep$?t#hF>Wa#y^5Sh=oOx1Un3az2tQeY`qhnTK7zYIKBI0000#bW%=J02d7- zH!gZvhHk%_fOJ19`@)cNRQhpK9I!oNs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