Last active
June 28, 2023 06:45
-
-
Save chongkan/453789c64cf8906000efcb61f499127e to your computer and use it in GitHub Desktop.
Backend + Frontend Dockerfile for Python/Django Development + Node.js/React Development
This file contains hidden or 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
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"] |
This file contains hidden or 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
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