Wire content-fetch-go into self-hosted Docker Compose setup

Replaces the Node.js content-fetch container with the Go implementation
in both self-hosted compose files, and enables MinIO-backed original
content uploads via BLOB_STORAGE_URL.

Changes:
- self-hosting/docker-compose/docker-compose.yml
  - content-fetch image: sh-content-fetch → sh-content-fetch-go
  - Remove USE_FIREFOX (Go service uses Chromium, no Firefox needed)
  - Add dependency on createbuckets (bucket must exist before uploads)

- self-hosting/docker-compose/self-build/docker-compose.yml
  - content-fetch build: packages/content-fetch → packages/content-fetch-go
  - Remove USE_FIREFOX
  - Add dependency on createbuckets

- self-hosting/docker-compose/.env.example
  - Remove SKIP_UPLOAD_ORIGINAL=true (uploads now work via MinIO)
  - Add BLOB_STORAGE_URL pointing to the MinIO container
  - Consolidate AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY entries
    (were split between two comment blocks, now in one place)

- packages/content-fetch-go/Dockerfile
  - Build stage: golang:1.24-alpine → golang:1.25-alpine (matches go.mod)

MinIO URL used: s3://omnivore?endpoint=http%3A%2F%2Fminio%3A9000&use_path_style=true&disable_https=true&region=us-east-1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Aliaksei Karneyeu 2026-03-05 11:55:38 +01:00
parent d87543ea8e
commit ade0be223c
4 changed files with 17 additions and 10 deletions

View file

@ -1,4 +1,4 @@
FROM golang:1.24-alpine AS build
FROM golang:1.25-alpine AS build
LABEL org.opencontainers.image.source="https://github.com/omnivore-app/omnivore"
RUN apk add --no-cache git ca-certificates

View file

@ -63,11 +63,18 @@ HIGHLIGHTS_BASE_URL=http://localhost:3000 # Front End - Need to change this when
VERIFICATION_TOKEN=some_token
REST_BACKEND_ENDPOINT=http://api:8080/api
SKIP_UPLOAD_ORIGINAL=true
# Minio
# Object storage for original fetched content.
# Uses MinIO (already running in this compose stack) via the S3-compatible API.
# For AWS S3: BLOB_STORAGE_URL=s3://omnivore?region=us-east-1
# For GCS: BLOB_STORAGE_URL=gs://omnivore
BLOB_STORAGE_URL=s3://omnivore?endpoint=http%3A%2F%2Fminio%3A9000&use_path_style=true&disable_https=true&region=us-east-1
# MinIO / S3 credentials (used by content-fetch-go and the API)
MINIO_ACCESS_KEY=minio
MINIO_SECRET_KEY=miniominio
AWS_ACCESS_KEY_ID=minio
AWS_SECRET_ACCESS_KEY=miniominio
AWS_S3_ENDPOINT_URL=http://minio:9000
# Export

View file

@ -73,12 +73,10 @@ services:
- .env
content-fetch:
image: "ghcr.io/omnivore-app/sh-content-fetch:latest"
image: "ghcr.io/omnivore-app/sh-content-fetch-go: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:
@ -86,6 +84,8 @@ services:
condition: service_healthy
api:
condition: service_healthy
createbuckets:
condition: service_completed_successfully
redis:
image: "redis:7.2.4"

View file

@ -92,13 +92,11 @@ services:
content-fetch:
build:
context: ../../../
dockerfile: ./packages/content-fetch/Dockerfile
context: ../../../packages/content-fetch-go
dockerfile: ./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:
@ -106,6 +104,8 @@ services:
condition: service_healthy
api:
condition: service_healthy
createbuckets:
condition: service_completed_successfully
redis:
image: "redis:7.2.4"