Files
omnivore/self-hosting/docker-compose/self-build/docker-compose.yml
Tom Rogers 4e582fb55d Improving Self-Hosting and Removing 3rd Party dependencies. (#4513)
* fix: Library Header layout shift

* Bump Github Actions versions.

* Self-Hosting Changes

* Fix Minio Environment Variable

* Just make pdfs successful, due to lack of PDFHandler

* Fix issue where flag was set wrong

* Added an NGINX Example file

* Add some documentation for self-hosting via Docker Compose

* Make some adjustments to Puppeteer due to failing sites.

* adjust timings

* Add start of Mail Service

* Fix Docker Files

* More email service stuff

* Add Guide to use Zapier for Email-Importing.

* Ensure that if no env is provided it uses the old email settings

* Add some instructions for self-hosted email

* Add SNS Endpoints for Mail Watcher

* Add steps and functionality for using SES and SNS for email

* Uncomment a few jobs.

* Added option for Firefox for parser. Was having issues with Chromium on Docker.

* Add missing space.

Co-authored-by: Russ Taylor <729694+russtaylor@users.noreply.github.com>

* Fix some wording on the Guide

* update browser extension to handle self-hosted instances

* add slight documentation to options page

* Fix MV

* Do raw handlers for Medium

* Fix images in Medium

* Update self-hosting/GUIDE.md

Co-authored-by: Mike Baker <1426795+mbaker3@users.noreply.github.com>

* Update Guide with other variables

* Add The Verge to JS-less handlers

* Update regex and image-proxy

* Update self-hosting/nginx/nginx.conf

Co-authored-by: Mike Baker <1426795+mbaker3@users.noreply.github.com>

* Update regex and image-proxy

* Update self-hosting/docker-compose/docker-compose.yml

Co-authored-by: Mike Baker <1426795+mbaker3@users.noreply.github.com>

* Fix Minio for Export

* Merge to main

* Update GUIDE with newer NGINX

* Update nginx config to include api/save route

* Enable Native PDF View for PDFS

* Enable Native PDF View for PDFS

* feat:lover packages test

* feat:working build

* feat:alpine build

* docs:api dockerfile docs

* Write a PDF.js wrapper to replace pspdfkit

* Revert changes for replication, set settings to have default mode

* build folder got removed due to gitignore on pdf

* Add Box shadow to pdf pages

* Add Toggle for Progress in PDFS, enabled native viewer toggle

* Update node version to LTS

* Update node version to LTS

* Fix Linting issues

* Fix Linting issues

* Make env variable nullable

* Add touchend listener for mobile

* Make changes to PDF for mobile

* fix(android): change serverUrl to selfhosted first

* feat:2 stage alpine content fetch

* feat:separated start script

* fix:changed to node 22

* Add back youtube functionality and add guide

* trigger build

* Fix cache issue on YouTube

* Allow empty AWS_S3_ENDPOINT

* Allow empty AWS_S3_ENDPOINT

* Add GCHR for all images

* Add GCHR For self hosting.

* Add GCHR For self hosting.

* Test prebuilt.

* Test prebuilt

* Test prebuilt...

* Fix web image

* Remove Web Image (For now)

* Move docker-compose to images

* Move docker-compose files to correct locations

* Remove the need for ARGS

* Update packages, and Typescript versions

* Fix

* Fix issues with build on Web

* Correct push

* Fix Linting issues

* Fix Trace import

* Add missing types

* Fix Tasks

* Add information into guide about self-build

* Fix issues with PDF Viewer

---------

Co-authored-by: keumky2 <keumky2@woowahan.com>
Co-authored-by: William Theaker <wtheaker@nvidia.com>
Co-authored-by: Russ Taylor <729694+russtaylor@users.noreply.github.com>
Co-authored-by: David Adams <david@dadams2.com>
Co-authored-by: Mike Baker <1426795+mbaker3@users.noreply.github.com>
Co-authored-by: m1xxos <66390094+m1xxos@users.noreply.github.com>
Co-authored-by: Adil <mr.adil777@gmail.com>
2025-01-27 13:33:16 +01:00

177 lines
3.9 KiB
YAML

version: '3'
x-postgres:
&postgres-common
image: "ankane/pgvector:v0.5.1"
user: postgres
healthcheck:
test: "exit 0"
interval: 2s
timeout: 12s
retries: 3
services:
postgres:
<<: *postgres-common
container_name: "omnivore-postgres"
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
env_file:
- .env
migrate:
build:
context: ../../../
dockerfile: ./packages/db/Dockerfile
container_name: "omnivore-migrate"
command: '/bin/sh ./packages/db/setup.sh' # Also create a demo user with email: demo@omnivore.app, password: demo_password
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
api:
build:
context: ../../../
dockerfile: ./packages/api/Dockerfile
container_name: "omnivore-api"
ports:
- "4000:8080"
healthcheck:
test: ["CMD-SHELL", "nc -z 0.0.0.0 8080 || exit 1"]
interval: 15s
timeout: 90s
retries: 6
env_file:
- .env
depends_on:
migrate:
condition: service_completed_successfully
queue-processor:
build:
context: ../../../
dockerfile: ./packages/api/queue-processor/Dockerfile
container_name: "omnivore-queue-processor"
env_file:
- .env
depends_on:
api:
condition: service_started
web:
build:
context: ../../../
dockerfile: ./packages/web/Dockerfile-self
args:
- APP_ENV=prod
- BASE_URL=http://localhost:3000
- SERVER_BASE_URL=http://localhost:4000
- HIGHLIGHTS_BASE_URL=http://localhost:3000
- USE_NATIVE_PDF=true
container_name: "omnivore-web"
ports:
- "3000:8080"
env_file:
.env
depends_on:
api:
condition: service_healthy
image-proxy:
build:
context: ../../../imageproxy
dockerfile: ./Dockerfile
container_name: "omnivore-image-proxy"
ports:
- "7070:8080"
env_file:
- .env
content-fetch:
build:
context: ../../../
dockerfile: ./packages/content-fetch/Dockerfile
container_name: "omnivore-content-fetch"
ports:
- "9090:8080"
environment:
- USE_FIREFOX=true # Using Firefox here because the official chrome version seems to freeze a lot in Docker.
env_file:
- .env
depends_on:
redis:
condition: service_healthy
api:
condition: service_healthy
redis:
image: "redis:7.2.4"
container_name: "omnivore-redis"
expose:
- 6379
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
volumes:
- redis_data:/data
minio:
image: minio/minio
expose:
- 1010
ports:
- "1010:9000"
healthcheck:
test: [ "CMD", "mc", "ready", "local" ]
interval: 5s
timeout: 1s
environment:
- "MINIO_ACCESS_KEY=minio"
- "MINIO_SECRET_KEY=miniominio"
- "AWS_S3_ENDPOINT_URL=http://minio:1010"
command: server /data
volumes:
- minio_data:/data
createbuckets:
image: minio/mc
environment:
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=miniominio
- BUCKET_NAME=omnivore
- ENDPOINT=http://minio:9000
- AWS_S3_ENDPOINT_URL=http://minio:9000
depends_on:
- minio
entrypoint: >
/bin/bash -c "
sleep 5;
until (/usr/bin/mc config host add myminio http://minio:9000 minio miniominio) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb myminio/omnivore;
/usr/bin/mc policy set public myminio/omnivore;
exit 0;
"
mail-watch-server:
build:
context: ../../../
dockerfile: ./packages/local-mail-watcher/Dockerfile
container_name: "omnivore-mail-watch-server"
ports:
- "4398:8080"
env_file:
- .env
depends_on:
redis:
condition: service_healthy
volumes:
pgdata:
redis_data:
minio_data: