docker maintenance

- added docker-compose.yml for quick one-command spinup
 - added docker-compose.dev.yml to override /habitrpg mount
 - modified Dockerfile to accept /habitrpg mount
This commit is contained in:
Matt Harrington 2016-01-04 03:33:51 +00:00
parent 85c532fe8a
commit 67f184c0f4
3 changed files with 18 additions and 0 deletions

View file

@ -28,11 +28,13 @@ 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 test -e /habitrpg || 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 test -e config.json || cp config.json.example config.json
RUN mkdir -p ./website/build
# Start Habitica

3
docker-compose.dev.yml Normal file
View file

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

13
docker-compose.yml Normal file
View file

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