omnivore/self-hosting/docker-compose/docker-compose.yml
Timothy Atapagra 0927294546 🚀 Stable Foundation: PDF Upload, Auth, and Infrastructure Fixes
 Core Stability Achievements:
- Demo user login working (demo@omnivore.app / demo_password)
- PDF upload, viewing, highlighting, and notes fully functional
- Database persistence across container restarts
- Redis connection issues resolved

🔧 Infrastructure Improvements:
- Added PostgreSQL persistent volumes (postgres_data, postgres_replica_data)
- Fixed Redis configuration with proper URLs and missing MQ_REDIS_URL
- Enhanced demo user creation with corrected ON CONFLICT clause
- Improved PDF content handler with better title extraction

🐛 Bug Fixes:
- Fixed demo user authentication by correcting setup.sh ON CONFLICT
- Resolved Redis connection errors in API and content-fetch services
- Enhanced RSS handler Redis client with null-check safety
- Added mail server data to gitignore

📚 Documentation:
- Added development vs production guide
- Added troubleshooting documentation
- Added Cursor AI rules for consistent development

🎯 Next Phase Ready:
Stable foundation established for implementing link upload/saving functionality.
2025-07-09 16:36:49 -04:00

190 lines
No EOL
4.5 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"
volumes:
- pgdata:/var/lib/postgresql/data
env_file:
- .env
migrate:
image: "ghcr.io/omnivore-app/sh-migrate:latest"
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
restart: "no"
api:
image: "ghcr.io/omnivore-app/sh-backend:latest"
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:
image: "ghcr.io/omnivore-app/sh-queue-processor:latest"
container_name: "omnivore-queue-processor"
env_file:
- .env
depends_on:
api:
condition: service_started
web:
image: "ghcr.io/omnivore-app/sh-web:latest"
container_name: "omnivore-web"
ports:
- "3000:8080"
env_file:
.env
depends_on:
api:
condition: service_healthy
image-proxy:
image: "ghcr.io/omnivore-app/sh-image-proxy:latest"
container_name: "omnivore-image-proxy"
ports:
- "7070:8080"
env_file:
- .env
content-fetch:
image: "ghcr.io/omnivore-app/sh-content-fetch:latest"
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
container_name: "omnivore-minio"
ports:
- "9000:9000" # API port
- "9001:9001" # Console port
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=miniominio
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
createbuckets:
image: minio/mc
depends_on:
minio:
condition: service_healthy
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=miniominio
- BUCKET_NAME=omnivore-lepq
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minio miniominio;
/usr/bin/mc mb myminio/${BUCKET_NAME} --ignore-existing;
/usr/bin/mc anonymous set download myminio/${BUCKET_NAME};
/usr/bin/mc policy set public myminio/${BUCKET_NAME};
exit 0;
"
mail-watch-server:
image: "ghcr.io/omnivore-app/sh-local-mail-watcher:latest"
container_name: "omnivore-mail-watch-server"
ports:
- "4398:8080"
env_file:
- .env
depends_on:
redis:
condition: service_healthy
# nginx:
# image: nginx:alpine
# container_name: "omnivore-nginx"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# - ./nginx/conf.d:/etc/nginx/conf.d:ro
# ports:
# - "80:80"
# - "443:443"
# depends_on:
# - web
# - api
# cloudflared:
# image: cloudflare/cloudflared:latest
# container_name: omnivore-cloudflared
# command: tunnel run
# environment:
# - TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
# restart: unless-stopped
# depends_on:
# - nginx
# webhook:
# image: almir/webhook
# container_name: omnivore-webhook
# volumes:
# - ./webhook/hooks.json:/etc/webhook/hooks.json
# ports:
# - "9000:9000" # Change this to a port that is not in use
volumes:
pgdata:
name: omnivore-pgdata
redis_data:
name: omnivore-redis-data
minio_data:
name: omnivore-minio-data
networks:
default:
name: omnivore-network