feat(app): add AFFiNE (#3069)
* feat: add AFFiNE * fix: add min and max values to password field * dezoom logo * fix password error message * change password requirements and error message * change version to "stable" * fix password min max in accordance to the regex validator Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * add supported architectures * refactor(affine): small changes in compose file * fix(affine): change container names --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Stavros <steveiliop56@gmail.com>
This commit is contained in:
parent
9bd42f2801
commit
511c28150b
53
apps/affine/config.json
Normal file
53
apps/affine/config.json
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "AFFiNE",
|
||||
"id": "affine",
|
||||
"available": true,
|
||||
"short_desc": "AFFiNE is a workspace with fully merged docs, whiteboards and databases.",
|
||||
"author": "https://github.com/toeverything",
|
||||
"port": 3010,
|
||||
"categories": [
|
||||
"utilities"
|
||||
],
|
||||
"description": "AFFiNE is a workspace with fully merged docs, whiteboards and databases. A privacy-focused, local-first, open-source, and ready-to-use alternative for Notion & Miro. Docs, canvas and tables are hyper-merged with AFFiNE - just like the word affine",
|
||||
"tipi_version": 1,
|
||||
"version": "stable",
|
||||
"source": "https://github.com/toeverything/affine",
|
||||
"website": "https://affine.pro",
|
||||
"exposable": true,
|
||||
"form_fields": [
|
||||
{
|
||||
"env_variable": "AFFINE_ADMIN_EMAIL",
|
||||
"label": "Admin Email",
|
||||
"pattern_error": "Invalid email",
|
||||
"regex": "^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$",
|
||||
"required": true,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"env_variable": "AFFINE_ADMIN_PASSWORD",
|
||||
"label": "Admin Password",
|
||||
"pattern_error": "Invalid password: Must have 1 lowercase, 1 uppercase, 1 special character, 1 digit and no $.",
|
||||
"regex": "^(?=.*\\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[^\\w\\d\\s:])([^\\s$]){8,128}$",
|
||||
"required": true,
|
||||
"type": "password",
|
||||
"min": 8,
|
||||
"max": 128
|
||||
},
|
||||
{
|
||||
"env_variable": "AFFINE_TELEMETRY_ENABLE",
|
||||
"label": "Enable affine telemetry?",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"env_variable": "AFFINE_POSTGRES_PASSWORD",
|
||||
"label": "Affine postgres password",
|
||||
"type": "random",
|
||||
"min": 32
|
||||
}
|
||||
],
|
||||
"supported_architectures": [
|
||||
"arm64",
|
||||
"amd64"
|
||||
]
|
||||
}
|
91
apps/affine/docker-compose.yml
Normal file
91
apps/affine/docker-compose.yml
Normal file
|
@ -0,0 +1,91 @@
|
|||
version: "3.9"
|
||||
services:
|
||||
affine:
|
||||
image: ghcr.io/toeverything/affine-graphql:stable
|
||||
container_name: affine
|
||||
command: ["sh", "-c", "node ./scripts/self-host-predeploy && node ./dist/index.js"]
|
||||
ports:
|
||||
- ${APP_PORT}:3010
|
||||
depends_on:
|
||||
affine-redis:
|
||||
condition: service_healthy
|
||||
affine-postgres:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
# Custom configurations
|
||||
- ${APP_DATA_DIR}/data/config:/root/.affine/config
|
||||
# Blob storage
|
||||
- ${APP_DATA_DIR}/data/storage:/root/.affine/storage
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "1000m"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_OPTIONS="--import=./scripts/register.js"
|
||||
- AFFINE_CONFIG_PATH=/root/.affine/config
|
||||
- REDIS_SERVER_HOST=affine-redis
|
||||
- DATABASE_URL=postgres://tipi:${AFFINE_POSTGRES_PASSWORD}@affine-postgres:5432/affine
|
||||
- NODE_ENV=production
|
||||
- AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL}
|
||||
- AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD}
|
||||
- TELEMETRY_ENABLE=${AFFINE_TELEMETRY_ENABLE}
|
||||
networks:
|
||||
- tipi_main_network
|
||||
labels:
|
||||
# Main
|
||||
traefik.enable: true
|
||||
traefik.http.middlewares.affine-web-redirect.redirectscheme.scheme: https
|
||||
traefik.http.services.affine.loadbalancer.server.port: 3010
|
||||
# Web
|
||||
traefik.http.routers.affine-insecure.rule: Host(`${APP_DOMAIN}`)
|
||||
traefik.http.routers.affine-insecure.entrypoints: web
|
||||
traefik.http.routers.affine-insecure.service: affine
|
||||
traefik.http.routers.affine-insecure.middlewares: affine-web-redirect
|
||||
# Websecure
|
||||
traefik.http.routers.affine.rule: Host(`${APP_DOMAIN}`)
|
||||
traefik.http.routers.affine.entrypoints: websecure
|
||||
traefik.http.routers.affine.service: affine
|
||||
traefik.http.routers.affine.tls.certresolver: myresolver
|
||||
# Local domain
|
||||
traefik.http.routers.affine-local-insecure.rule: Host(`affine.${LOCAL_DOMAIN}`)
|
||||
traefik.http.routers.affine-local-insecure.entrypoints: web
|
||||
traefik.http.routers.affine-local-insecure.service: affine
|
||||
traefik.http.routers.affine-local-insecure.middlewares: affine-web-redirect
|
||||
# Local domain secure
|
||||
traefik.http.routers.affine-local.rule: Host(`affine.${LOCAL_DOMAIN}`)
|
||||
traefik.http.routers.affine-local.entrypoints: websecure
|
||||
traefik.http.routers.affine-local.service: affine
|
||||
traefik.http.routers.affine-local.tls: true
|
||||
|
||||
affine-redis:
|
||||
image: redis
|
||||
container_name: affine-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${APP_DATA_DIR}/data/redis:/data
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- tipi_main_network
|
||||
|
||||
affine-postgres:
|
||||
image: postgres
|
||||
container_name: affinepostgres
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U affine" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
environment:
|
||||
POSTGRES_USER: tipi
|
||||
POSTGRES_PASSWORD: ${AFFINE_POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: affine
|
||||
networks:
|
||||
- tipi_main_network
|
23
apps/affine/metadata/description.md
Executable file
23
apps/affine/metadata/description.md
Executable file
|
@ -0,0 +1,23 @@
|
|||
## AFFiNE
|
||||
|
||||
[AFFiNE](https://affine.pro) is an open-source, all-in-one workspace and an operating system for all the building blocks that assemble your knowledge base and much more -- wiki, knowledge management, presentation and digital assets. It's a better alternative to Notion and Miro.
|
||||
|
||||
![](https://cdn.affine.pro/Github_hero_image1.png)
|
||||
|
||||
### Features
|
||||
|
||||
**A true canvas for blocks in any form. Docs and whiteboard are now fully merged.**
|
||||
|
||||
- Many editor apps claim to be a canvas for productivity, but AFFiNE is one of the very few which allows you to put any building block on an edgeless canvas -- rich text, sticky notes, any embedded web pages, multi-view databases, linked pages, shapes and even slides. We have it all.
|
||||
|
||||
**Multimodal AI partner ready to kick in any work**
|
||||
|
||||
- Write up professional work report? Turn an outline into expressive and presentable slides? Summary an article into a well-structured mindmap? Sorting your job plan and backlog for tasks? Or... draw and code prototype apps and web pages directly all with one prompt? With you, AFFiNE AI pushes your creativity to the edge of your imagination.
|
||||
|
||||
**Local-first & Real-time collaborative**
|
||||
|
||||
- We love the idea of local-first that you always own your data on your disk, in spite of the cloud. Furthermore, AFFiNE supports real-time sync and collaborations on web and cross-platform clients.
|
||||
|
||||
**Self-host & Shape your own AFFiNE**
|
||||
|
||||
- You have the freedom to manage, self-host, fork and build your own AFFiNE. Plugin community and third-party blocks are coming soon. More tractions on [Blocksuite](https://blocksuite.io). Check there to learn how to [self-host AFFiNE](https://docs.affine.pro/docs/self-host-affine).
|
BIN
apps/affine/metadata/logo.jpg
Normal file
BIN
apps/affine/metadata/logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Loading…
Reference in New Issue
Block a user