-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 706 Bytes
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
# Use official Python image as base
FROM python:3.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory inside the container
WORKDIR /app
# Copy requirements file and Install dependencies
COPY requirements.txt /app/
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the rest of the project
COPY . /app/
# Copy entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Collect static files (optional, for production)
# RUN python littlelemon/manage.py collectstatic --noinput
# Expose port (Django default is 8000)
EXPOSE 8000
# Run the application
ENTRYPOINT ["sh", "/app/entrypoint.sh"]