mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Merge pull request #9 from nicolabeghin/docker-support
Add Docker configuration for containerized deployment
This commit is contained in:
commit
9dceb8a895
3 changed files with 34 additions and 0 deletions
15
.dockerignore
Normal file
15
.dockerignore
Normal 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
8
Dockerfile
Normal 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
11
docker-compose.yml
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue