-
-
Save mattkime/387acee42ac494910060f6f20eea86d9 to your computer and use it in GitHub Desktop.
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
FROM node:6 | |
RUN useradd --user-group --create-home --shell /bin/false mup | |
# copy app code to container | |
WORKDIR /home/mup/mup-web | |
COPY . /home/mup/mup-web | |
RUN chown -R mup:mup /home/mup/mup-web | |
USER mup | |
ENV API_PROTOCOL=https | |
ENV DEV_SERVER_PORT=8000 | |
ENV NODE_PATH=/home/mup/node_modules | |
ENV PATH=/home/mup/node_modules/.bin/:$PATH | |
# cache builds | |
# only rebuild if package.json has changed | |
WORKDIR /home/mup/ | |
COPY package.json /home/mup/package.json | |
RUN npm install --only=prod | |
EXPOSE 8000 | |
WORKDIR /home/mup/mup-web | |
CMD npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment