* feat: add reverse proxy support * improve * improve * improve * improve * improve * fix: update integration test to use modern 'docker compose' command - Replace 'docker-compose' with 'docker compose' (Docker Compose v2+) - Add fallback to legacy docker-compose command for compatibility - Fixes test failures on systems using Docker Compose plugin * ci: trigger test rerun * fix: make docker-compose detection more robust for CI - Add get_docker_compose_command() to detect available command - Use shutil.which() to check command availability - Dynamically use correct command (docker compose vs docker-compose) - Should work in both modern and legacy Docker environments * fix: docker-compose networking in base path integration test Fix connection refused error in test_reverse_proxy_simple_config by handling host vs bridge networking modes correctly: - Linux (host mode): nginx listens on 18080 directly, no port mapping - Mac/Windows (bridge mode): nginx listens on 80, mapped to 18080 With host networking, port mappings in docker-compose don't work since the container binds directly to the host's network namespace.
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
# Docker Compose file for Hindsight with PostgreSQL and pgvector
|
|
#
|
|
# Make sure to set the required environment variables before running:
|
|
# - HINDSIGHT_DB_PASSWORD: Password for the PostgreSQL user
|
|
# - Configure LLM provider variables as needed (see below in the hindsight service)
|
|
#
|
|
# Usage:
|
|
# docker compose up -d
|
|
#
|
|
# Optional environment variables with defaults:
|
|
# - HINDSIGHT_VERSION: Hindsight application version (default: latest)
|
|
# - HINDSIGHT_DB_USER: PostgreSQL user (default: hindsight_user)
|
|
# - HINDSIGHT_DB_NAME: PostgreSQL database name (default: hindsight_db)
|
|
# - HINDSIGHT_DB_VERSION: PostgreSQL version (default: 18)
|
|
|
|
services:
|
|
db:
|
|
# Use a PostgreSQL-Image with pgvector extension pre-installed
|
|
# see https://hub.docker.com/r/pgvector/pgvector
|
|
image: pgvector/pgvector:pg${HINDSIGHT_DB_VERSION:-18}
|
|
container_name: hindsight-db
|
|
restart: always
|
|
# Expose PostgreSQL port
|
|
# ports:
|
|
# - "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: ${HINDSIGHT_DB_USER:-hindsight_user}
|
|
POSTGRES_PASSWORD: ${HINDSIGHT_DB_PASSWORD:?Please set the HINDSIGHT_DB_PASSWORD env variable}
|
|
POSTGRES_DB: ${HINDSIGHT_DB_NAME:-hindsight_db}
|
|
volumes:
|
|
- pg_data:/var/lib/postgresql/${HINDSIGHT_DB_VERSION:-18}/docker
|
|
networks:
|
|
- hindsight-net
|
|
|
|
hindsight:
|
|
image: ghcr.io/vectorize-io/hindsight:${HINDSIGHT_VERSION:-latest}
|
|
container_name: hindsight-app
|
|
ports:
|
|
- "8888:8888"
|
|
- "9999:9999"
|
|
environment:
|
|
- HINDSIGHT_API_LLM_API_KEY=${OPENAI_API_KEY?Please set the OPENAI_API_KEY env variable}
|
|
- HINDSIGHT_API_DATABASE_URL=postgresql://${HINDSIGHT_DB_USER:-hindsight_user}:${HINDSIGHT_DB_PASSWORD:?Please set the HINDSIGHT_DB_PASSWORD env variable}@db:5432/${HINDSIGHT_DB_NAME:-hindsight_db}
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- hindsight-net
|
|
|
|
networks:
|
|
hindsight-net:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
pg_data:
|