2025-01-16 14:20:20 +01:00
|
|
|
# backend/Dockerfile
|
|
|
|
FROM python:3.9-slim
|
2025-01-17 00:29:43 +01:00
|
|
|
|
2025-01-16 14:20:20 +01:00
|
|
|
# Set environment variables
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
|
|
|
# Set work directory
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Install system dependencies
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
gcc \
|
|
|
|
postgresql-client \
|
|
|
|
netcat-openbsd \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install Python dependencies
|
2025-01-17 00:29:43 +01:00
|
|
|
#COPY requirements.txt .
|
|
|
|
COPY . .
|
2025-01-16 14:20:20 +01:00
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
# Copy entrypoint script and set permissions
|
2025-01-17 00:29:43 +01:00
|
|
|
#COPY entrypoint.sh /entrypoint.sh
|
|
|
|
#RUN chmod +x /entrypoint.sh \
|
|
|
|
# && sed -i 's/\r$//g' /entrypoint.sh
|
2025-01-16 14:20:20 +01:00
|
|
|
|
2025-01-17 00:29:43 +01:00
|
|
|
#ENTRYPOINT ["/entrypoint.sh"]
|