habitica/Dockerfile

42 lines
803 B
Text
Raw Normal View History

2014-08-05 15:58:01 +00:00
FROM ubuntu:trusty
MAINTAINER Thibault Cohen <titilambert@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
### Init
RUN apt-get update
2014-08-07 04:39:57 +00:00
### Utils
2014-08-05 15:58:01 +00:00
2014-08-07 04:39:57 +00:00
RUN apt-get install -y git vim graphicsmagick nodejs phantomjs npm pkgconf libcairo2-dev libjpeg8-dev
2014-08-05 15:58:01 +00:00
### Installation
RUN cd /opt && git clone https://github.com/HabitRPG/habitrpg.git
2014-08-07 04:39:57 +00:00
#RUN cd /opt/habitrpg && git checkout -t origin/develop
2014-08-05 15:58:01 +00:00
RUN cd /opt/habitrpg && git pull
2014-08-07 04:39:57 +00:00
RUN cd /opt/habitrpg && npm install -g grunt-cli bower nodemon
2014-08-05 15:58:01 +00:00
RUN ln -s /usr/bin/nodejs /usr/bin/node
2014-08-07 04:39:57 +00:00
RUN cd /opt/habitrpg && npm install
2014-08-05 15:58:01 +00:00
# Add config file
2014-08-07 04:39:57 +00:00
2014-08-05 15:58:01 +00:00
ADD ./config.json /opt/habitrpg/
2014-08-07 04:39:57 +00:00
RUN mkdir -p /opt/habitrpg/build
RUN cd /opt/habitrpg && bower install --allow-root
2014-08-05 15:58:01 +00:00
# Run server
2014-08-07 04:39:57 +00:00
RUN cd /opt/habitrpg && grunt build:prod
2014-08-05 15:58:01 +00:00
2014-08-07 04:39:57 +00:00
CMD cd /opt/habitrpg && grunt nodemon