|
|
@ -6,17 +6,26 @@ ENV PYTHONUNBUFFERED=1 \ |
|
|
|
|
|
|
|
|
WORKDIR /app |
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
# Install system dependencies |
|
|
|
|
|
|
|
|
# Copy requirements file first |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
|
|
|
|
|
|
# Install build dependencies for psycopg2, install pip requirements, then clean up build tools |
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
|
build-essential \ |
|
|
|
|
|
|
|
|
gcc \ |
|
|
|
|
|
python3-dev \ |
|
|
libpq-dev \ |
|
|
libpq-dev \ |
|
|
|
|
|
libpq5 \ |
|
|
|
|
|
&& pip install --no-cache-dir -r requirements.txt \ |
|
|
|
|
|
&& apt-get purge -y --auto-remove gcc python3-dev libpq-dev \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
# Copy requirements and install |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
|
# Copy entrypoint script and set executable permissions |
|
|
|
|
|
COPY entrypoint.sh /app/entrypoint.sh |
|
|
|
|
|
RUN chmod +x /app/entrypoint.sh |
|
|
|
|
|
|
|
|
# Copy source code |
|
|
|
|
|
|
|
|
# Copy backend source code |
|
|
COPY backend /app/backend |
|
|
COPY backend /app/backend |
|
|
|
|
|
|
|
|
EXPOSE 8000 |
|
|
EXPOSE 8000 |
|
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"] |