mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 11:46:23 +00:00
* upgrade node to version 6 * upgrade npm to v4 * update shrinkwrap * use npm 4 in travis * use mongoose 4.6.4 * update shrinkwrap * fix async test and upgrade mongoose * fix amazon test * remove debugging code * working tests with separate server * update coupon code * mupdate mongoose * nvm: relax node version in .nvmrc
43 lines
1,006 B
Docker
43 lines
1,006 B
Docker
FROM ubuntu:trusty
|
|
|
|
MAINTAINER Sabe Jones <sabe@habitica.com>
|
|
|
|
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
|
|
RUN echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
|
|
|
|
# Install prerequisites
|
|
RUN apt-get update
|
|
RUN apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
git \
|
|
libfontconfig1 \
|
|
libfreetype6 \
|
|
libkrb5-dev \
|
|
python
|
|
|
|
# Install NodeJS
|
|
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
|
|
RUN apt-get install -y nodejs
|
|
|
|
# Clean up package management
|
|
RUN apt-get clean
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install global packages
|
|
RUN npm install -g npm@4
|
|
RUN npm install -g gulp grunt-cli bower
|
|
|
|
# Clone Habitica repo and install dependencies
|
|
WORKDIR /habitrpg
|
|
RUN git clone https://github.com/HabitRPG/habitrpg.git /habitrpg
|
|
RUN npm install
|
|
RUN bower install --allow-root
|
|
|
|
# Create environment config file and build directory
|
|
RUN cp config.json.example config.json
|
|
RUN mkdir -p ./website/build
|
|
|
|
# Start Habitica
|
|
EXPOSE 3000
|
|
CMD ["npm", "start"]
|