Skip to content

Commit

Permalink
add docker-compose-test.yml and updates others dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmota committed Mar 7, 2019
1 parent ca005c7 commit 56512e0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "run", "dev"]
CMD ["npm", "start"]
15 changes: 15 additions & 0 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
command: node_modules/.bin/mocha test/unit/**.js -w
environment:
NODE_ENV: TEST
ports:
- '3000:3000'
env_file:
- .env
volumes:
- .:/usr/app
12 changes: 7 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
version: '3'
services:
app:
build: .
build:
context: .
dockerfile: Dockerfile
command: node_modules/.bin/nodemon --exec npm start
environment:
NODE_ENV: development
ports:
- '3000:3000'
env_file:
- .env
volumes:
- .:/usr/app
environment:
- NODE_ENV=DEV
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}

- NODE_ENV=DEV

0 comments on commit 56512e0

Please sign in to comment.