Docker improvements (#8297)

* Improved docker, bower

* npm install missing mocha

* Fix for 'npm install -g npm@4' not resulting in a functional npm

* Improve speed of 'docker start' by withholding directories not used by image environment

* Reverting changes to bower.json
This commit is contained in:
Rick Kasten 2016-12-28 03:33:24 -05:00 committed by Matteo Pagliazzi
parent bf5ad2db1f
commit c0c74659c5
4 changed files with 13 additions and 8 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
.git
website

View file

@ -20,17 +20,19 @@ RUN apt-get install -y \
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
RUN apt-get install -y nodejs
# Install npm@latest
RUN curl -sL https://www.npmjs.org/install.sh | sh
# 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
RUN npm install -g gulp grunt-cli bower mocha
# Clone Habitica repo and install dependencies
WORKDIR /habitrpg
RUN git clone https://github.com/HabitRPG/habitrpg.git /habitrpg
RUN git clone https://github.com/HabitRPG/habitica.git /habitrpg
RUN npm install
RUN bower install --allow-root

View file

@ -1,3 +1,3 @@
web:
volumes:
- '.:/habitrpg'
- '.:/habitrpg'

View file

@ -1,13 +1,13 @@
web:
build: .
ports:
- "3000:3000"
- "3000:3000"
links:
- mongo
- mongo
environment:
- NODE_DB_URI=mongodb://mongo/habitrpg
- NODE_DB_URI=mongodb://mongo/habitrpg
mongo:
image: mongo
ports:
- "27017:27017"
- "27017:27017"