docker
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
# Use an official Python runtime as a base image
|
||||
FROM python:3.13.5-slim-bookworm
|
||||
|
||||
# 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 libpq-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt /app/
|
||||
RUN pip install --upgrade pip && pip install -r requirements.txt
|
||||
|
||||
# Copy project
|
||||
COPY . /app/
|
||||
|
||||
# Run migrations & collect static in production (optional)
|
||||
# CMD ["python", "manage.py", "migrate"] && ["python", "manage.py", "collectstatic", "--noinput"]
|
||||
|
||||
# Command to run the server
|
||||
# CMD ["gunicorn", "freekake_api.wsgi:application", "--bind", "0.0.0.0:8000"]
|
||||
Reference in New Issue
Block a user