From 2c7d36b2bc1983e8d39a45923d0f12c67bceb14d Mon Sep 17 00:00:00 2001 From: wanghe Date: Tue, 20 Aug 2024 17:50:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20AFFiNE=20(#1954)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/affine/README.md | 21 ++++++++ apps/affine/data.yml | 19 +++++++ apps/affine/logo.png | Bin 0 -> 3862 bytes apps/affine/stable/data.yml | 74 ++++++++++++++++++++++++++ apps/affine/stable/docker-compose.yml | 34 ++++++++++++ 5 files changed, 148 insertions(+) create mode 100644 apps/affine/README.md create mode 100644 apps/affine/data.yml create mode 100644 apps/affine/logo.png create mode 100644 apps/affine/stable/data.yml create mode 100644 apps/affine/stable/docker-compose.yml diff --git a/apps/affine/README.md b/apps/affine/README.md new file mode 100644 index 00000000..b76b8b07 --- /dev/null +++ b/apps/affine/README.md @@ -0,0 +1,21 @@ +# AFFiNE + +**AFFiNE** 是一个开源的一体化工作区和操作系统,适用于构建知识库的所有构建块以及更多内容——wiki、知识管理、演示和数字资产。它是 Notion 和 Miro 的更好替代品。 + +## 主要特征: + +### 任何形式的块的真正画布,文档和白板现已完全合并。 + +- 许多编辑器应用都声称自己是生产力的画布,但 AFFiNE 是极少数允许您在无边画布上放置任何构建块的应用之一——富文本、便签、任何嵌入式网页、多视图数据库、链接页面、形状甚至幻灯片。我们拥有一切。 + +### 多模式 AI 合作伙伴随时准备投入任何工作 + +- 撰写专业的工作报告?将大纲变成富有表现力且易于展示的幻灯片?将文章总结为结构良好的思维导图?整理工作计划和待办事项?或者... 只需一个提示即可直接绘制和编写原型应用程序和网页?有了你,AFFiNE AI 可以将您的创造力推向想象的边缘。 + +### 本地优先、实时协作 + +- 我们喜欢本地优先的理念,即无论使用云端,您始终拥有磁盘上的数据。此外,AFFiNE 支持在 Web 和跨平台客户端上进行实时同步和协作。 + +### 自托管并塑造您自己的 AFFiNE + +- 您可以自由地管理、自行托管、分叉和构建自己的 AFFiNE。插件社区和第三方模块即将推出。Blocksuite 上还有更多牵引力。查看那里了解如何自行托管 AFFiNE。 \ No newline at end of file diff --git a/apps/affine/data.yml b/apps/affine/data.yml new file mode 100644 index 00000000..c3872152 --- /dev/null +++ b/apps/affine/data.yml @@ -0,0 +1,19 @@ +name: AFFiNE +tags: + - 实用工具 +title: 将文档、白板和数据库完全整合的工作空间 +description: 将文档、白板和数据库完全整合的工作空间 +additionalProperties: + key: affine + name: AFFiNE + tags: + - Tool + shortDescZh: 将文档、白板和数据库完全整合的工作空间 + shortDescEn: A workspace with fully merged docs, whiteboards and databases + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://affine.pro + github: https://github.com/toeverything/AFFiNE + document: https://docs.affine.pro/docs/self-host-affine \ No newline at end of file diff --git a/apps/affine/logo.png b/apps/affine/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c0f973a537a83454340914806309d427b6c15ae0 GIT binary patch literal 3862 zcmV+x59#oUP)iqE=rku9k>HaacQ`6?M+&T)Si~`W%5+ z2SiC*N9;dAD1o?wN_9w5qR|UqC&-N0%kG$C%qTg&O{hnTSKFq1sYin3`2WWi8ge`| zQ5K22ZQ#jVC9w}P?~b-}+=)_y5d=}}!`L=L;ao5|KL2V*9>TdalcB83`8^08-nV# zCQ@N0V`Y@yrNT_J5Z|&k@0LB$Hmrx%gY84840M0w${tlqW?->@(gd;(-?^5J*oXD) zqgji6Sl_vpwAhFBoojJdKq}1So;eZzpkn{H7Icl{O3kwy)D}sX*_MHoe|Cc!Ql(uA zw^#|~4Qll;+Yq;ns8!s0i{oL7Lbq|X>~ix=KWb5kdgE$kBlcmxS8gpmo=1#Sm>Y}2 zK%O=vR{qHiYK#2AOQIIB^3Q8f^O>KA5m)QsOGIBOSskrC)*TG+=mxdUgQXx>%fpi! z)S)u`KnC;=t}vT2eL__QV&$J|A0RH2MpYzM{-G6Shn10F8>*GfV=Bz^T5{Y7T&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G~iKb^3lR9vy-Z^jX^u1$l}DCGZV?Lx*`;AsWh2e4O~cpiqs zC}i0Zw2OIe$v=j_dSn@7)@|-v;=kL-%Gi=?*glEQSBk~mQ8KU+h2FT3%h-~`_F+uA z{1wcQNGc8;j@RWfa^*4HfmrJGRT^I(LAc7gJ%D1bS`|Ei2%8M8iwD-6P=B5P7gm0L zmh1OB=pR=ro9#kO7OmDXvHmJ}{k~G=OZ`c*SKIX%pRxWJNS<)H5amKlxs-zC2goS~ zr?&qgp!Cn6U=svE5ClOG1VIo4K@bE%5ClOG1VIo4K@bE%5ClOG1VIo4K@bE%5Pp~c Y1Ee^zmv%UK-2eap07*qoM6N<$f?>v3`2YX_ literal 0 KcmV+b0RR6000031 diff --git a/apps/affine/stable/data.yml b/apps/affine/stable/data.yml new file mode 100644 index 00000000..dc18035e --- /dev/null +++ b/apps/affine/stable/data.yml @@ -0,0 +1,74 @@ +additionalProperties: + formFields: + - default: 3010 + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: HTTP 端口 + required: true + rule: paramPort + type: number + - default: 5555 + envKey: PANEL_APP_PORT_HTTP_5555 + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: AFFINE_ADMIN_EMAIL + labelEn: email + labelZh: 管理员邮箱 + required: true + type: text + - default: "" + edit: true + envKey: AFFINE_ADMIN_PASSWORD + labelEn: password + labelZh: 管理员密码 + required: true + type: password + - default: "" + envKey: PANEL_DB_HOST + key: postgresql + labelEn: PostgreSQL Database Service + labelZh: PostgreSQL 数据库服务 + required: true + type: service + - default: affine + envKey: PANEL_DB_NAME + labelEn: Database + labelZh: 数据库名 + random: true + required: true + rule: paramCommon + type: text + - default: affine + envKey: PANEL_DB_USER + labelEn: User + labelZh: 数据库用户 + random: true + required: true + rule: paramCommon + type: text + - default: affine + envKey: PANEL_DB_USER_PASSWORD + labelEn: Password + labelZh: 数据库用户密码 + random: true + required: true + rule: paramComplexity + type: password + - default: "" + envKey: PANEL_REDIS_HOST + key: redis + labelEn: Redis Service + labelZh: redis 服务 + required: true + type: service + - default: "" + disabled: true + envKey: PANEL_REDIS_ROOT_PASSWORD + labelEn: Password + labelZh: redis 密码 + type: text \ No newline at end of file diff --git a/apps/affine/stable/docker-compose.yml b/apps/affine/stable/docker-compose.yml new file mode 100644 index 00000000..b07f40fd --- /dev/null +++ b/apps/affine/stable/docker-compose.yml @@ -0,0 +1,34 @@ +services: + affine: + image: ghcr.io/toeverything/affine-graphql:stable + container_name: ${CONTAINER_NAME} + restart: unless-stopped + ports: + - ${PANEL_APP_PORT_HTTP}:3010 + - ${PANEL_APP_PORT_HTTP_5555}:5555 + command: + ['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js'] + volumes: + - ./data/storage:/root/.affine/storage + - ./data/config:/root/.affine/config + networks: + - 1panel-network + environment: + - NODE_OPTIONS="--import=./scripts/register.js" + - AFFINE_CONFIG_PATH=/root/.affine/config + - REDiIS_SERVER_HOST=${REDIS_HOST} + - REDIS_SERVER_PORT=6379 + - REDIS_SERVER_PASSWORD=${PANEL_REDIS_ROOT_PASSWORD} + - DATABASE_URL=postgres://${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@${PANEL_DB_HOST}:${PANEL_DB_PORT}/${PANEL_DB_NAME} + - NODE_ENV=production + - AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL} + - AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD} + logging: + driver: 'json-file' + options: + max-size: '1000m' + labels: + createdBy: "Apps" +networks: + 1panel-network: + external: true \ No newline at end of file