Last active
October 2, 2017 04:27
-
-
Save mikebz/53eac80130f126797088b435fcdf9d0e to your computer and use it in GitHub Desktop.
Dockerfile for Django, Python and Webpack static build
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.6-slim | |
# install node | |
RUN apt-get -y update | |
RUN apt-get -y install curl | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash | |
RUN apt-get -y install nodejs | |
WORKDIR /app | |
ADD . /app | |
# install requirements for python and node | |
# compile them | |
RUN pip install -r requirements.txt | |
RUN npm install | |
RUN npm run build | |
EXPOSE 8000 | |
ENV NAME DEBUG | |
CMD ["python", "manage.py", "runserver"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment