first commit
This commit is contained in:
25
backend/Dockerfile
Normal file
25
backend/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV DJANGO_DEBUG=false
|
||||
ENV SQLITE_PATH=/data/db.sqlite3
|
||||
ENV MEDIA_ROOT=/data/media
|
||||
ENV DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,backend
|
||||
ENV CORS_ALLOWED_ORIGINS=http://localhost:8080,http://127.0.0.1:8080
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends libjpeg62-turbo zlib1g \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
RUN chmod +x /app/docker-entrypoint.sh
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
Reference in New Issue
Block a user