35 lines
881 B
Docker
35 lines
881 B
Docker
FROM python:3.11-slim
|
|
|
|
LABEL maintainer="NetBird MSP Appliance"
|
|
LABEL description="Multi-tenant NetBird management platform"
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements first for caching
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY app/ ./app/
|
|
COPY templates/ ./templates/
|
|
COPY static/ ./static/
|
|
|
|
# Create data directories
|
|
RUN mkdir -p /app/data /app/logs /app/backups
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
|
|
CMD curl -f http://localhost:8000/api/health || exit 1
|
|
|
|
# Run the application
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "info"]
|