Skip to content

API broken on self-hositng docker #4637

@YuvrajSingh099

Description

@YuvrajSingh099

I am self hosting on docker via official image. I am having problem with https///api . I use cloudflare to forward http://localhost:4001 to it . Web App loads correctly with serving at https///api but graphesql goes to https///api/api/graphsql instead of https///api/api/graphsql. My docker compose: version: '3'

services:
postgres:
image: "ankane/pgvector:v0.5.1"
user: postgres
container_name: "omnivore-postgres"
ports:
- "5442:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgrespass
POSTGRES_DB: omnivore
POSTGRES_HOST_AUTH_METHOD: md5
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data

migrate:
image: "ghcr.io/omnivore-app/sh-migrate:latest"
container_name: "omnivore-migrate"
command: '/bin/sh ./packages/db/setup.sh'
environment:
PGPASSWORD: postgrespass
POSTGRES_USER: postgres
PG_HOST: postgres
PG_PASSWORD: postgrespass
PG_DB: omnivore
PG_PORT: 5432
depends_on:
postgres:
condition: service_healthy

api:
image: "ghcr.io/omnivore-app/sh-backend:latest"
container_name: "omnivore-api"
ports:
- "4001:8080"
environment:
API_ENV: local
PG_HOST: postgres
PG_USER: postgres
PG_PASSWORD: postgrespass
PG_DB: omnivore
PG_PORT: 5432
PG_POOL_MAX: 20
JWT_SECRET: 1c4tOZAQ0dANpNXbTGNcOK5gvUu1OCYeIRMsbCm4qqg=
SSO_JWT_SECRET: m2qnsb3MQDvE5wvf9hoQWAize/7Z31XBt8TyEcHdD0g=
IMAGE_PROXY_SECRET: 3t/x4FsViD5f80RXov+F4qvVXtLCxTYqi83oUcvn5Mw=
CLIENT_URL: https://omnivore.
GATEWAY_URL: https://omnivore-api.
REDIS_URL: redis://redis:6379
CONTENT_FETCH_URL: http://content-fetch:8080/?token=0ec79786ac76496d5c98feb05400c052
WATCHER_API_KEY: 8e5501fb4ce7c88a59d1480c631e6d828badb710fe349532e08b283da6e95696
WATCHER_API_ENDPOINT: http://mail-watch-server:8080
LOCAL_EMAIL_DOMAIN: yuvrajsingh.org
IMAP_USER: @
IMAP_PASSWORD: password
IMAP_HOST: imap.hostinger.com
IMAP_PORT:
OMNIVORE_EMAIL: username-uuid@
healthcheck:
test: ["CMD-SHELL", "nc -z 0.0.0.0 8080 || exit 1"]
interval: 15s
timeout: 90s
retries: 6
depends_on:
migrate:
condition: service_completed_successfully
redis:
condition: service_healthy

queue-processor:
image: "ghcr.io/omnivore-app/sh-queue-processor:latest"
container_name: "omnivore-queue-processor"
environment:
PG_HOST: postgres
PG_USER: postgres
PG_PASSWORD: postgrespass
PG_DB: omnivore
PG_PORT: 5432
PG_POOL_MAX: 20
REDIS_URL: redis://redis:6379
JWT_SECRET: 1c4tOZAQ0dANpNXbTGNcOK5gvUu1OCYeIRMsbCm4qqg=
SSO_JWT_SECRET: m2qnsb3MQDvE5wvf9hoQWAize/7Z31XBt8TyEcHdD0g=
IMAGE_PROXY_SECRET: 3t/x4FsViD5f80RXov+F4qvVXtLCxTYqi83oUcvn5Mw=
CLIENT_URL: https://omnivore.
GATEWAY_URL: https://omnivore-api.
API_ENV: local
WATCHER_API_KEY: 8e5501fb4ce7c88a59d1480c631e6d828badb710fe349532e08b283da6e95696
LOCAL_EMAIL_DOMAIN: yuvrajsingh.org
depends_on:
api:
condition: service_healthy

web:
image: "ghcr.io/omnivore-app/sh-web:latest"
container_name: "omnivore-web"
ports:
- "3001:8080"
environment:
NEXT_PUBLIC_APP_ENV: prod
NEXT_PUBLIC_BASE_URL: https://omnivore.yuvrajsingh.org
NEXT_PUBLIC_SERVER_BASE_URL: https://omnivore-api.
NEXT_PUBLIC_HIGHLIGHTS_BASE_URL: https://omnivore.
SERVER_BASE_URL: https://omnivore-api.
BASE_URL: https://omnivore.
depends_on:
api:
condition: service_healthy

image-proxy:
image: "ghcr.io/omnivore-app/sh-image-proxy:latest"
container_name: "omnivore-image-proxy"
ports:
- "7071:8080"
environment:
IMAGE_PROXY_SECRET: 3t/x4FsViD5f80RXov+F4qvVXtLCxTYqi83oUcvn5Mw=

content-fetch:
image: "ghcr.io/omnivore-app/sh-content-fetch:latest"
container_name: "omnivore-content-fetch"
ports:
- "9091:8080"
environment:
USE_FIREFOX: "true"
JWT_SECRET: 1c4tOZAQ0dANpNXbTGNcOK5gvUu1OCYeIRMsbCm4qqg=
VERIFICATION_TOKEN: 0ec79786ac76496d5c98feb05400c052
REST_BACKEND_ENDPOINT: http://api:8080/api
REDIS_URL: redis://redis:6379
depends_on:
redis:
condition: service_healthy
api:
condition: service_healthy

redis:
image: "redis:7.2.4"
container_name: "omnivore-redis"
expose:
- 6379
ports:
- "6389:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
volumes:
- redis_data:/data

minio:
image: minio/minio
container_name: "omnivore-minio"
ports:
- "1011:9000"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 1s
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: miniominio
command: server /data
volumes:
- minio_data:/data

createbuckets:
image: minio/mc
container_name: "omnivore-createbuckets"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: miniominio
BUCKET_NAME: omnivore
depends_on:
- minio
entrypoint: >
/bin/bash -c "
sleep 5;
until (/usr/bin/mc alias set myminio http://minio:9000 minio miniominio) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb myminio/omnivore 2>/dev/null || true;
/usr/bin/mc anonymous set public myminio/omnivore;
exit 0;
"

mail-watch-server:
image: "ghcr.io/omnivore-app/sh-local-mail-watcher:latest"
container_name: "omnivore-mail-watch-server"
ports:
- "4399:8080"
environment:
REDIS_URL: redis://redis:6379
API_URL: http://api:8080
WATCHER_API_KEY: 8e5501fb4ce7c88a59d1480c631e6d828badb710fe349532e08b283da6e95696
LOCAL_EMAIL_DOMAIN:
IMAP_USER: @
IMAP_PASSWORD: password
IMAP_HOST: imap.hostinger.com
IMAP_PORT:
depends_on:
redis:
condition: service_healthy
api:
condition: service_healthy

volumes:
pgdata:
redis_data:
minio_data:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions