habitica-self-host/Dockerfile-Production

23 lines
713 B
Text
Raw Normal View History

2017-07-05 20:29:25 +00:00
FROM node:boron
2017-09-01 18:22:55 +00:00
# Upgrade NPM to v5 (Yarn is needed because of this bug https://github.com/npm/npm/issues/16807)
# The used solution is suggested here https://github.com/npm/npm/issues/16807#issuecomment-313591975
RUN yarn global add npm@5
2017-07-05 20:29:25 +00:00
# Install global packages
RUN npm install -g gulp grunt-cli bower mocha
# Clone Habitica repo and install dependencies
RUN mkdir -p /usr/src/habitrpg
WORKDIR /usr/src/habitrpg
2017-09-28 23:50:29 +00:00
RUN git clone --branch v4.0.3 https://github.com/HabitRPG/habitica.git /usr/src/habitrpg
2017-07-05 20:29:25 +00:00
RUN npm install
RUN bower install --allow-root
RUN gulp build:prod --force
# Create Build dir
RUN mkdir -p ./website/build
# Start Habitica
EXPOSE 3000
CMD ["node", "./website/transpiled-babel/index.js"]