From 0cebeaa54e7bf9f2a1b98886217f72373205b219 Mon Sep 17 00:00:00 2001 From: Jasper Date: Fri, 10 May 2024 05:04:36 -0700 Subject: [PATCH] App Submission: Affine (#990) Co-authored-by: nmfretz --- affine/data/config/.gitkeep | 0 affine/data/storage/blob/.gitkeep | 0 affine/data/storage/postgres/.gitkeep | 0 affine/data/storage/redis/.gitkeep | 0 affine/docker-compose.yml | 56 +++++++++++++++++++++++++++ affine/umbrel-app.yml | 40 +++++++++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 affine/data/config/.gitkeep create mode 100644 affine/data/storage/blob/.gitkeep create mode 100644 affine/data/storage/postgres/.gitkeep create mode 100644 affine/data/storage/redis/.gitkeep create mode 100644 affine/docker-compose.yml create mode 100644 affine/umbrel-app.yml diff --git a/affine/data/config/.gitkeep b/affine/data/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/affine/data/storage/blob/.gitkeep b/affine/data/storage/blob/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/affine/data/storage/postgres/.gitkeep b/affine/data/storage/postgres/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/affine/data/storage/redis/.gitkeep b/affine/data/storage/redis/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/affine/docker-compose.yml b/affine/docker-compose.yml new file mode 100644 index 0000000..aeaaf78 --- /dev/null +++ b/affine/docker-compose.yml @@ -0,0 +1,56 @@ +services: + + app_proxy: + environment: + APP_HOST: affine_web_1 + APP_PORT: 3010 + + web: + image: ghcr.io/toeverything/affine-graphql:stable-06890d6@sha256:e80b83a14f11cdaf5388d156cf4bfb1933c39fa8e3f85d7b2874ac4cec72e625 + restart: on-failure + init: true + command: + ['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js'] + environment: + - NODE_OPTIONS="--import=./scripts/register.js" + - AFFINE_CONFIG_PATH=/root/.affine/config + - REDIS_SERVER_HOST=affine_redis_1 + - DATABASE_URL=postgres://affine:affine@db:5432/affine + - NODE_ENV=production + - AFFINE_ADMIN_EMAIL=admin@umbrel.local + - AFFINE_ADMIN_PASSWORD=$APP_PASSWORD + volumes: + - ${APP_DATA_DIR}/data/config:/root/.affine/config + - ${APP_DATA_DIR}/data/storage/blob:/root/.affine/storage + depends_on: + redis: + condition: service_healthy + db: + condition: service_healthy + + redis: + image: redis:7.2.4@sha256:e647cfe134bf5e8e74e620f66346f93418acfc240b71dd85640325cb7cd01402 + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/storage/redis:/data + healthcheck: + test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping'] + interval: 10s + timeout: 5s + retries: 5 + + db: + image: postgres:16.2@sha256:f58300ac8d393b2e3b09d36ea12d7d24ee9440440e421472a300e929ddb63460 + restart: on-failure + environment: + POSTGRES_USER: affine + POSTGRES_PASSWORD: affine + POSTGRES_DB: affine + PGDATA: /var/lib/postgresql/data/pgdata + volumes: + - ${APP_DATA_DIR}/data/storage/postgres:/var/lib/postgresql/data + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U affine'] + interval: 10s + timeout: 5s + retries: 5 \ No newline at end of file diff --git a/affine/umbrel-app.yml b/affine/umbrel-app.yml new file mode 100644 index 0000000..16280bd --- /dev/null +++ b/affine/umbrel-app.yml @@ -0,0 +1,40 @@ +manifestVersion: 1 +id: affine +name: Affine +tagline: Open source alternative to Notion, Miro, and Airtable +category: files +version: "0.14.2" +port: 3013 +description: >- + A privacy-focused, local-first, open-source, and ready-to-use alternative for Notion & Miro. + One hyper-fused platform for wildly creative minds. + + + 🛠️ SET-UP INSTRUCTIONS + + In order to save your data, you need to sign in to your self-hosted Affine instance: + + + 1. In the Affine app select the "Sign up/ Sign in" to sync with your self-hosted instance. + + + 2. Enter the email and password credentials that are provided when you installed the app. To find these again, right-click on the Affine app icon + on the umbrelOS homescreen and select "Show default credentials". + + + 3. Follow the steps to create your self-hosted cloud workspace. You are now ready to use Affine with your self-hosted instance! +developer: toeverything +website: https://affine.pro +submitter: Jasper +submission: https://github.com/getumbrel/umbrel-apps/pull/990 +repo: https://github.com/toeverything/AFFiNE +support: https://docs.affine.pro +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +releaseNotes: "" +dependencies: [] +path: "" +defaultUsername: "admin@umbrel.local" +deterministicPassword: true \ No newline at end of file