22 lines
390 B
Docker
22 lines
390 B
Docker
# Dockerfile
|
|
# Pull the base image
|
|
FROM python:3.11.7-slim-bookworm
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# Set work directory
|
|
WORKDIR /code
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt /code/
|
|
RUN pip install -r requirements.txt
|
|
|
|
# Copy project
|
|
COPY . /code/
|
|
|
|
# Run migrations
|
|
# RUN python manage.py makemigrations
|
|
RUN python manage.py migrate
|