-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 938 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use Python 3.11 Alpine image
FROM python:3.11-alpine
# Set environment variables
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
# Set work directory
WORKDIR /app
# Install system dependencies required for Poetry
# This might include build dependencies for packages that have C extensions
RUN apk add --no-cache curl build-base libffi-dev
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Add Poetry to PATH
ENV PATH="${PATH}:/root/.local/bin"
# Copy the project files into the working directory
COPY . /app
# Disable virtualenv creation by Poetry
# and install the dependencies in the system
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi
# Set work directory to django_celery_redis directory which contains manage.py file.
WORKDIR /app/django_celery_redis
# Command to run on container start
CMD ["python", "manage.py", "runserver", "0.0.0.0:8002"]