diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..93ac769994 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +.git +website diff --git a/Dockerfile b/Dockerfile index 407c416f21..28718a4caa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 33216b0184..bfabd76efd 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,3 +1,3 @@ web: volumes: - - '.:/habitrpg' + - '.:/habitrpg' diff --git a/docker-compose.yml b/docker-compose.yml index 898000def7..0afed9a927 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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"