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