diff --git a/backend/Dockerfile b/backend/Dockerfile index 1dbe388..d2f5373 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -13,12 +13,16 @@ WORKDIR /code # Install system dependencies (Nginx included) RUN apt-get update \ && apt-get install -y git postgresql-client gdal-bin libgdal-dev nginx \ - && apt-get clean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY ./server/requirements.txt /code/ -RUN pip install --upgrade pip -RUN pip install -r requirements.txt +RUN pip install --upgrade pip \ + && pip install -r requirements.txt + +# Create necessary directories +RUN mkdir -p /code/static /code/media # Copy the Django project code into the Docker image COPY ./server /code/ @@ -37,4 +41,4 @@ RUN chmod +x /code/entrypoint.sh EXPOSE 80 8000 # Command to start Nginx and Gunicorn -CMD ["bash", "-c", "service nginx start && /code/entrypoint.sh"] +CMD ["bash", "-c", "service nginx start && /code/entrypoint.sh"] \ No newline at end of file