Merge pull request #9 from nicolabeghin/docker-support

Add Docker configuration for containerized deployment
This commit is contained in:
Tejas Chopra 2026-01-19 17:53:17 -08:00 committed by GitHub
commit 9dceb8a895
3 changed files with 34 additions and 0 deletions

15
.dockerignore Normal file
View file

@ -0,0 +1,15 @@
.git
__pycache__
*.pyc
*.pyo
.pytest_cache
.coverage
.mypy_cache
.ruff_cache
tests/
docs/
CHANGELOG.md
LICENSE
NOTICE
.env
*.log

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM python:3.11-slim
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
COPY . /app
WORKDIR /app
RUN pip install -e .[proxy]
EXPOSE 8787
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:8787/health || exit 1
ENTRYPOINT ["headroom", "proxy"]

11
docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
services:
headroom-proxy:
build: .
command: ["--host", "0.0.0.0"]
environment:
- HEADROOM_HOST=0.0.0.0
# if you want to use a custom OpenAI-compatible API endpoint,
# uncomment and set the following line with the desired URL
# - OPENAI_TARGET_API_URL=https://api.x.ai
ports:
- "8787:8787"