Files
docupulse/Dockerfile
2025-05-26 15:45:23 +02:00

30 lines
622 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
netcat-traditional \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Make entrypoint script executable
RUN chmod +x entrypoint.sh
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
# Expose the port the app runs on
EXPOSE 5000
# Use the entrypoint script
ENTRYPOINT ["./entrypoint.sh"]