Fix issues with local Docker development.

This commit is contained in:
Alex Dancho 2019-12-31 11:47:32 -05:00
parent 0fd0a29a4d
commit e47845535a
3 changed files with 12 additions and 7 deletions

View file

@ -3,9 +3,12 @@ FROM node:12
# Install global packages
RUN npm install -g gulp-cli mocha
# Copy Habitica code into container and install dependencies
# Copy package.json and package-lock.json into image, then install
# dependencies.
WORKDIR /usr/src/habitica
COPY . /usr/src/habitica
COPY ["package.json", "package-lock.json", "./"]
RUN npm install
# Copy the remaining source files in.
COPY . /usr/src/habitica
RUN npm run postinstall

View file

@ -15,8 +15,9 @@ services:
ports:
- "8080:8080"
volumes:
- .:/code
- /code/node_modules
- .:/usr/src/habitica
- /usr/src/habitica/node_modules
- /usr/src/habitica/website/client/node_modules
server:
build:
context: .
@ -32,8 +33,8 @@ services:
ports:
- "3000:3000"
volumes:
- .:/code
- /code/node_modules
- .:/usr/src/habitica
- /usr/src/habitica/node_modules
mongo:
image: mongo:3.6
networks:

View file

@ -116,6 +116,7 @@ module.exports = {
},
devServer: {
disableHostCheck: true,
proxy: {
// proxy all requests to the server at IP:PORT as specified in the top-level config
'^/api/v3': {