31 lines
609 B
Docker

# Use official Python image
FROM python:3.10
# Set working directory
WORKDIR /app
# Copy application code
COPY . .
# Add before pip install step
RUN apt-get update && apt-get install -y \
build-essential \
libgeos-dev \
libspatialindex-dev \
libproj-dev \
proj-data \
proj-bin \
gdal-bin \
libgdal-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the application port
EXPOSE 8000
# Run Gunicorn server
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "polisplexity.wsgi:application"]