File size: 743 Bytes
f38d204
c7d603c
 
 
20f0740
c7d603c
20f0740
 
 
 
 
c7d603c
 
 
20f0740
 
c7d603c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.12-slim

WORKDIR /app

# Install dependencies first (cached layer on rebuilds)
COPY pyproject.toml README.md openenv.yaml ./
RUN mkdir -p hr_env server agent && \
    touch hr_env/__init__.py server/__init__.py agent/__init__.py && \
    pip install --no-cache-dir ".[server]"

# Copy actual source
COPY hr_env/ hr_env/
COPY server/ server/

# Reinstall project only (deps already installed above)
RUN pip install --no-cache-dir --no-deps .

ENV ENABLE_WEB_INTERFACE=true

EXPOSE 8000

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
    CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1

CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]