mirror of
https://github.com/taylanbakircioglu/flowfish.git
synced 2026-09-12 05:48:55 +00:00
d7ca50b387
Multi-cluster dependency mapping, real-time network monitoring, impact analysis, and CI/CD integration capabilities. Made-with: Cursor
37 lines
962 B
Docker
37 lines
962 B
Docker
# Graph Writer Service Dockerfile
|
|
|
|
FROM python:3.11-slim AS base
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
# Force IPv4 to avoid IPv6 connectivity issues in build environments
|
|
RUN echo 'Acquire::ForceIPv4 "true";' > /etc/apt/apt.conf.d/99force-ipv4 && \
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements from service directory (build context is workspace root)
|
|
COPY services/graph-writer/requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code from service directory
|
|
COPY services/graph-writer/ .
|
|
|
|
# Create non-root user
|
|
RUN useradd -m -u 1000 appuser && \
|
|
chown -R appuser:0 /app && \
|
|
chmod -R g=u /app
|
|
|
|
USER appuser
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD python -c "print('alive')" || exit 1
|
|
|
|
# Run the service
|
|
CMD ["python", "main.py"]
|
|
|