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
|
2017-10-12 14:44:28 +00:00
|
|
|
RUN npm install -g gulp mocha
|
2017-07-05 20:29:25 +00:00
|
|
|
|
|
|
|
|
# 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 gulp build:prod --force
|
|
|
|
|
|
|
|
|
|
# Create Build dir
|
|
|
|
|
RUN mkdir -p ./website/build
|
|
|
|
|
|
|
|
|
|
# Start Habitica
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
CMD ["node", "./website/transpiled-babel/index.js"]
|