Last active
November 29, 2017 02:34
-
-
Save enko/31be945ca47b0c481275e76a2b695714 to your computer and use it in GitHub Desktop.
docker and colors reproduction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_runner: | |
build: . | |
command: npm run test-dashboard | |
volumes: | |
- .:/usr/src/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_runner: | |
build: . | |
command: npm run test | |
volumes: | |
- .:/usr/src/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:6.6 | |
# add node modules folder to path and set global node path | |
ENV NODE_PATH /opt/node_modules | |
ENV PATH /opt/node_modules/.bin:$PATH | |
# copy dependency file for npm into the container --> everytime (to update possible dependencies) | |
ADD package.json /opt/package.json | |
# rm old node_modules | |
RUN rm -rf /opt/node_modules | |
# locally install project dependencies int NODE_PATH (defined above) | |
RUN cd /opt && npm install | |
WORKDIR /usr/src/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"test-dashboard": "nodejs-dashboard mocha test.js", | |
"test": "mocha test.js" | |
}, | |
"dependencies": { | |
"mocha": "^3.0.2", | |
"nodejs-dashboard": "^0.1.0" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('test',() => { | |
it('test', () => { | |
throw new Error('oh hai'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment