Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shyanukant committed Oct 2, 2023
1 parent 6eca976 commit 8d339ea
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# Use the official Python image as the base image
FROM python:3.10

# Set the working directory
WORKDIR /app

COPY requirements.txt .
# Create a virtual environment
RUN python -m venv venv

RUN pip install --no-cache-dir virtualenv
RUN virtualenv venv
# Activate the virtual environment
SHELL ["venv/bin/activate"]

ENV PATH="/app/venv/bin:$PATH"
# Update pip to the latest version
RUN pip install --no-cache-dir --upgrade pip

# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of your Django application code
COPY . .

# Start your Django application as usual
EXPOSE $PORT

CMD gunicorn squib.wsgi:application --workers=4 --bind 0.0.0.0:$PORT

0 comments on commit 8d339ea

Please sign in to comment.