From 70eeeb07f5459e44e2aa53e2b69b78ea10a14957 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Sat, 4 Oct 2025 16:02:15 -0700 Subject: [PATCH] added openarchiver --- openarchiver/README.md | 8 ++++ openarchiver/docker-compose.yml | 40 ++++++++++++++++++++ openarchiver/sample.env | 65 +++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 openarchiver/README.md create mode 100644 openarchiver/docker-compose.yml create mode 100644 openarchiver/sample.env diff --git a/openarchiver/README.md b/openarchiver/README.md new file mode 100644 index 0000000..45a7146 --- /dev/null +++ b/openarchiver/README.md @@ -0,0 +1,8 @@ +# Open Archiver + +## First Run + +Will give you a chance to setup a new user. + +You can add an ingestion source and it just starts importing. + diff --git a/openarchiver/docker-compose.yml b/openarchiver/docker-compose.yml new file mode 100644 index 0000000..6304b8a --- /dev/null +++ b/openarchiver/docker-compose.yml @@ -0,0 +1,40 @@ +services: + open-archiver: + image: logiclabshq/open-archiver:latest + ports: + - '3000:3000' # Frontend + env_file: + - sample.env + volumes: + - ${VOL_PATH:-./data}/archiver-data:/var/data/open-archiver + depends_on: + - postgres + - valkey + - meilisearch + + postgres: + image: postgres:17-alpine + environment: + POSTGRES_DB: ${POSTGRES_DB:-open_archive} + POSTGRES_USER: ${POSTGRES_USER:-admin} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} + volumes: + - ${VOL_PATH:-./data}/pgdata:/var/lib/postgresql/data + + valkey: + image: valkey/valkey:8-alpine + command: valkey-server --requirepass ${REDIS_PASSWORD:-RedisPasswordChangeMe} + volumes: + - ${VOL_PATH:-./data}/valkeydata:/data + + meilisearch: + image: getmeili/meilisearch:v1.15 + environment: + MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-aSampleMasterKey} + volumes: + - ${VOL_PATH:-./data}/meilidata:/meili_data + + tika: + image: apache/tika:3.2.2.0-full + + diff --git a/openarchiver/sample.env b/openarchiver/sample.env new file mode 100644 index 0000000..dd7785f --- /dev/null +++ b/openarchiver/sample.env @@ -0,0 +1,65 @@ +VOL_PATH=./data + +# --- Application Settings --- +# Set to 'production' for production environments +NODE_ENV=development +PORT_BACKEND=4000 +PORT_FRONTEND=3000 +# The frequency of continuous email syncing. Default is every minutes, but you can change it to another value based on your needs. +SYNC_FREQUENCY='* * * * *' + +# --- Docker Compose Service Configuration --- +# These variables are used by docker-compose.yml to configure the services. Leave them unchanged if you use Docker services for Postgresql, Valkey (Redis) and Meilisearch. If you decide to use your own instances of these services, you can substitute them with your own connection credentials. + +# PostgreSQL +POSTGRES_DB=open_archive +POSTGRES_USER=admin +POSTGRES_PASSWORD=password +DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}" + +# Meilisearch +MEILI_MASTER_KEY=aSampleMasterKey +MEILI_HOST=http://meilisearch:7700 +# The number of emails to batch together for indexing. Defaults to 500. +MEILI_INDEXING_BATCH=500 + +# Redis (We use Valkey, which is Redis-compatible and open source) +REDIS_HOST=valkey +REDIS_PORT=6379 +REDIS_PASSWORD=RedisPasswordChangeMe +# If you run Valkey service from Docker Compose, set the REDIS_TLS_ENABLED variable to false. +REDIS_TLS_ENABLED=false + +# --- Storage Settings --- +# Choose your storage backend. Valid options are 'local' or 's3'. +STORAGE_TYPE=local +# The maximum request body size to accept in bytes including while streaming. The body size can also be specified with a unit suffix for kilobytes (K), megabytes (M), or gigabytes (G). For example, 512K or 1M. Defaults to 512kb. Or the value of Infinity if you don't want any upload limit. +BODY_SIZE_LIMIT=100M + +# --- Local Storage Settings --- +# The path inside the container where files will be stored. +# This is mapped to a Docker volume for persistence. +# This is only used if STORAGE_TYPE is 'local'. +STORAGE_LOCAL_ROOT_PATH=/var/data/open-archiver + +# --- Security & Authentication --- + +# Rate Limiting +# The window in milliseconds for which API requests are checked. Defaults to 60000 (1 minute). +RATE_LIMIT_WINDOW_MS=60000 +# The maximum number of API requests allowed from an IP within the window. Defaults to 100. +RATE_LIMIT_MAX_REQUESTS=100 + +# JWT +# IMPORTANT: Change this to a long, random, and secret string in your .env file +JWT_SECRET=a-very-secret-key-that-you-should-change +JWT_EXPIRES_IN="7d" + +# Master Encryption Key for sensitive data (Such as Ingestion source credentials and passwords) +# IMPORTANT: Generate a secure, random 32-byte hex string for this +# You can use `openssl rand -hex 32` to generate a key. +ENCRYPTION_KEY=bbffe1e3ae16ee30e8e4f15b401a46d34582147e14526a0f37f93d4ad5c6cb04 + +# Apache Tika Integration +# ONLY active if TIKA_URL is set +TIKA_URL=http://tika:9998