-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from 07CalC/main
added Dockerfile
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM python:3.13 | ||
|
||
RUN mkdir /app | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Set environment variables | ||
# Prevents Python from writing pyc files to disk | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
#Prevents Python from buffering stdout and stderr | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
# Upgrade pip | ||
RUN pip install --upgrade pip | ||
|
||
# Copy the Django project and install dependencies | ||
COPY requirements.txt /app/ | ||
|
||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
|
||
COPY . /app/ | ||
|
||
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:slim | ||
|
||
WORKDIR /app | ||
|
||
ADD package*.json /app/ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
CMD ["npx", "serve", "-s", "dist", "-p", "5173"] | ||
|