fixed tests
This commit is contained in:
+12
-2
@@ -6,7 +6,8 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
UV_PROJECT_ENVIRONMENT=/app/.venv
|
||||
UV_PROJECT_ENVIRONMENT=/app/.venv \
|
||||
ENVIRONMENT=production
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
@@ -15,7 +16,7 @@ WORKDIR /app
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
||||
|
||||
# Copy dependency files
|
||||
COPY pyproject.toml ./
|
||||
COPY pyproject.toml README.md ./
|
||||
|
||||
# Install Python dependencies
|
||||
RUN uv sync --no-dev
|
||||
@@ -26,6 +27,15 @@ ENV PATH="/app/.venv/bin:$PATH"
|
||||
# Copy application code
|
||||
COPY src/ ./src/
|
||||
|
||||
# Add healthcheck
|
||||
HEALTHCHECK \
|
||||
--interval=30s \
|
||||
--timeout=30s \
|
||||
--start-period=5s \
|
||||
--retries=3 \
|
||||
CMD python -c "import urllib.request; \
|
||||
urllib.request.urlopen('http://localhost:8000/health', timeout=10)"
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user