Add Docker support with Dockerfile and entrypoint
All checks were successful
Docker / build (push) Successful in 28s
All checks were successful
Docker / build (push) Successful in 28s
This commit is contained in:
parent
faf880a236
commit
4bc1afa0cb
8 changed files with 118 additions and 2 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
# Create volume mount points
|
||||
RUN mkdir -p /app/media /app/static /app/data
|
||||
|
||||
# Collect static files at build time (uses a dummy key, no DB needed)
|
||||
RUN SECRET_KEY=build-time-placeholder DB_ENGINE=sqlite python manage.py collectstatic --noinput
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
RUN chmod +x entrypoint.sh
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue