From ebc37bbd0d772eb736f7ba6de74a8177c43c21fd Mon Sep 17 00:00:00 2001 From: zhenyus Date: Fri, 1 Aug 2025 09:06:42 +0800 Subject: [PATCH] refactor: streamline DevOpsReconcileRequest by removing redundant code Signed-off-by: zhenyus --- apps/devops/Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 apps/devops/Dockerfile diff --git a/apps/devops/Dockerfile b/apps/devops/Dockerfile new file mode 100644 index 0000000..1d96106 --- /dev/null +++ b/apps/devops/Dockerfile @@ -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"] \ No newline at end of file