-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6eca976
commit 8d339ea
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |