From 6b7f170df9a4519f2e2e19be376ec1d375307eeb Mon Sep 17 00:00:00 2001 From: Thomas Rogers Date: Wed, 6 Nov 2024 19:43:51 +0100 Subject: [PATCH] Fix some wording on the Guide --- README.md | 19 +------------------ packages/local-mail-watcher/src/watcher.ts | 4 +++- self-hosting/GUIDE.md | 11 +++++++---- self-hosting/docker-compose/mail/.env.mail | 1 + 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 3a239b649..1fa9f08bf 100644 --- a/README.md +++ b/README.md @@ -151,24 +151,7 @@ is done fetching your content you will see it in your library. ## How to deploy to your own server -Omnivore was originally designed to be deployed on GCP and takes advantage -of some of GCP's PaaS features. We are working to make Omnivore more portable -so you can easily run the service on your own infrastructure. You can track -progress here: - -To deploy Omnivore on your own hardware you will need to deploy three -dockerized services and configure access to a postgres service. To handle -PDF documents you will need to configure access to a Google Cloud Storage -bucket. - -- `packages/api` - the backend API service -- `packages/web` - the web frontend (can easily be deployed to vercel) -- `packages/puppeteer-parse` - the content fetching service (can easily - be deployed as an AWS lambda or GCP Cloud Function) - -Additionally, you will need to run our database migrations to initialize -your database. These are dockerized and can be run with the -`packages/db` service. +A guide for running a self hosted server can be found [here](./self-hosting/GUIDE.md) ## License diff --git a/packages/local-mail-watcher/src/watcher.ts b/packages/local-mail-watcher/src/watcher.ts index 7d435d79c..0cc6917db 100644 --- a/packages/local-mail-watcher/src/watcher.ts +++ b/packages/local-mail-watcher/src/watcher.ts @@ -14,7 +14,9 @@ chokidar.watch(env.filesystem.filePath).on('add', (path, _event) => { console.log('Sent to email API') }) .then(() => { - fs.unlinkSync(path) + if (process.env['DELETE_FILE'] == 'true') { + fs.unlinkSync(path) + } console.log('Deleted File') }) }) diff --git a/self-hosting/GUIDE.md b/self-hosting/GUIDE.md index 85ada8a67..c6559e942 100644 --- a/self-hosting/GUIDE.md +++ b/self-hosting/GUIDE.md @@ -85,8 +85,9 @@ this from the docker-compose and provide the host, username and password of the Redis is used as a queueing system, and for caching. If you have a Redis Instance already it is possible to remove this from the docker-compose and rely on the hosted Redis. You must replace the redis url for this. -#### Minio -Minio is an AWS S3 compatible Object storage service. It allows you to use the S3 Storage API. +#### Minio (Self-Host) +Minio is an AWS S3 compatible Object storage service that you can self-host. It is included in the docker-compose file. +It allows you to use the S3 Storage API. We also have a small client that creates the necessary buckets (createbuckets). See below: ```bash @@ -97,7 +98,9 @@ until (/usr/bin/mc config host add myminio http://minio:9000 minio miniominio) d If you use GCS, or S3 buckets you can do the following: -##### S3: +##### S3 (Optional): +S3 is an AWS Block Storage Service. You can also use S3 as your storage service, rather than the included MinIO self-host. In order to use S3, you must do the following. + Replace the following with the correct parameters. ```env AWS_ACCESS_KEY_ID=minio # Used for Minio S3 Client @@ -111,7 +114,7 @@ LOCAL_MINIO_URL=http://localhost:1010 ``` -##### GCS: +##### GCS (Optional): Remove the following Environment Variable: ```env GCS_USE_LOCAL_HOST=true diff --git a/self-hosting/docker-compose/mail/.env.mail b/self-hosting/docker-compose/mail/.env.mail index 7b17cdd31..ecd7b0750 100644 --- a/self-hosting/docker-compose/mail/.env.mail +++ b/self-hosting/docker-compose/mail/.env.mail @@ -2,3 +2,4 @@ WATCHER_API_KEY=mail-api-key MAIL_FILE_PATH=/var/mail/domain.tld/user/new WATCHER_API_ENDPOINT=https://omnivore-watch.domain.tld +DELETE_FILE=true