whitebophir/Dockerfile

17 lines
338 B
Docker
Raw Normal View History

2018-11-26 15:29:11 +00:00
FROM node:10-alpine
WORKDIR /opt/app
COPY . /opt/app
2018-11-26 15:29:11 +00:00
ENV PORT=80
EXPOSE 80
VOLUME /opt/app/server-data
2018-11-26 15:29:11 +00:00
RUN touch /usr/bin/start.sh # this is the script which will run on start
RUN echo 'npm install --production' >> /usr/bin/start.sh
RUN echo 'node /opt/app/server/server.js' >> /usr/bin/start.sh
CMD ["/bin/sh","/usr/bin/start.sh"]