refactor: streamline DevOpsReconcileRequest by removing redundant code
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
14eb5abda6
commit
ebc37bbd0d
31
apps/devops/Dockerfile
Normal file
31
apps/devops/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
FROM python:3.12-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Copy requirements and install Python dependencies
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy application code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV LOG_BASE_PATH=/app/log/devsvc
|
||||||
|
|
||||||
|
# Create necessary directories
|
||||||
|
RUN mkdir -p /app/log/devops
|
||||||
|
|
||||||
|
# Expose port
|
||||||
|
EXPOSE 8014
|
||||||
|
|
||||||
|
# Health check
|
||||||
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
||||||
|
CMD curl -f http://localhost:8014/api/_/healthz || exit 1
|
||||||
|
|
||||||
|
# Start the application
|
||||||
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8014", "--reload"]
|
||||||
Loading…
Reference in New Issue
Block a user