Skip to content

Commit

Permalink
Merge pull request #1 from 07CalC/main
Browse files Browse the repository at this point in the history
added Dockerfile
  • Loading branch information
JoYBoY1210 authored Feb 5, 2025
2 parents 25b9756 + 9f98267 commit 65d0ab8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
26 changes: 26 additions & 0 deletions backend/Dockerfile
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"]
14 changes: 14 additions & 0 deletions frontend/Dockerfile
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"]

0 comments on commit 65d0ab8

Please sign in to comment.