22 lines
409 B
Docker
22 lines
409 B
Docker
|
|
# Use official Python image
|
||
|
|
FROM python:3.12-slim
|
||
|
|
|
||
|
|
# Install dependencies for psql
|
||
|
|
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
# Set working directory
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
# Install dependencies
|
||
|
|
COPY requirements.txt .
|
||
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
|
|
||
|
|
# Copy project files
|
||
|
|
COPY . .
|
||
|
|
|
||
|
|
# Expose port
|
||
|
|
EXPOSE 80
|
||
|
|
|
||
|
|
# Run Flask app
|
||
|
|
CMD ["python", "main.py"]
|