Skip to content

Instantly share code, notes, and snippets.

@chongkan
Last active June 28, 2023 06:45
Show Gist options
  • Save chongkan/453789c64cf8906000efcb61f499127e to your computer and use it in GitHub Desktop.
Save chongkan/453789c64cf8906000efcb61f499127e to your computer and use it in GitHub Desktop.
Backend + Frontend Dockerfile for Python/Django Development + Node.js/React Development
FROM python:3.9
WORKDIR /app/backend
COPY backend/requirements.txt .
RUN pip install -r requirements.txt
COPY backend/ .
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
FROM node:14
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY . .
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment