mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
26 lines
535 B
Docker
26 lines
535 B
Docker
# Use an official Python runtime as a parent image
|
|
FROM python:3.12-slim
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# Set work directory
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
python3-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy project
|
|
COPY . .
|
|
|
|
# Remove the automatic migration
|
|
# RUN python manage.py migrate
|