Updated docker + build

This commit is contained in:
Wyatt Johnson
2017-02-01 12:54:04 -07:00
parent f4177f318f
commit 6b582fdb2c
5 changed files with 21 additions and 46 deletions
+1
View File
@@ -1,2 +1,3 @@
node_modules
test
.git
+5 -2
View File
@@ -1,5 +1,8 @@
FROM node:7
# Install yarn
RUN npm install -g yarn
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
@@ -12,9 +15,9 @@ EXPOSE 5000
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install --production
RUN yarn install --production
# Bundle app source
COPY . /usr/src/app
CMD [ "npm", "start" ]
CMD [ "yarn", "start" ]
+9 -3
View File
@@ -4,11 +4,17 @@ machine:
services:
- docker
- redis
environment:
PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
dependencies:
override:
- yarn
cache_directories:
- ~/.cache/yarn
post:
# Lint the project here, before tests are ran.
- npm run lint
- yarn lint
database:
post:
@@ -20,9 +26,9 @@ database:
test:
override:
# Run the tests using the junit reporter.
- MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit/test-results.xml NPM_PACKAGE_CONFIG_MOCHA_REPORTER=mocha-junit-reporter npm run test
- MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit/test-results.xml MOCHA_REPORTER=mocha-junit-reporter yarn test
# Run the e2e test suite
- E2E_REPORT_PATH=$CIRCLE_TEST_REPORTS/e2e npm run e2e
- E2E_REPORT_PATH=$CIRCLE_TEST_REPORTS/e2e yarn e2e
deployment:
release:
-35
View File
@@ -1,35 +0,0 @@
version: '2'
services:
talk:
image: coralproject/talk:latest
build: .
restart: always
ports:
- "5000:5000"
- "2525:2525"
environment:
- "TALK_PORT=5000"
- "TALK_MONGO_URL=mongodb://mongo"
- "TALK_REDIS_URL=redis://redis"
depends_on:
- mongo
- redis
mongo:
image: mongo:3.2
restart: always
volumes:
- mongo:/data/db
redis:
image: redis:3.2-alpine
restart: always
volumes:
- redis:/data
volumes:
mongo:
external: false
redis:
external: false
+6 -6
View File
@@ -10,23 +10,23 @@
"build-watch": "NODE_ENV=development webpack --config webpack.config.js --watch",
"lint": "eslint bin/* .",
"lint-fix": "eslint bin/* . --fix",
"test": "TEST_MODE=unit NODE_ENV=test mocha -R ${NPM_PACKAGE_CONFIG_MOCHA_REPORTER:-spec}",
"test": "TEST_MODE=unit NODE_ENV=test mocha -R ${MOCHA_REPORTER:-spec}",
"test-cover": "TEST_MODE=unit NODE_ENV=test istanbul cover _mocha --report text --check-coverage -- -R spec",
"pree2e": "NODE_ENV=test TALK_PORT=3011 scripts/pree2e.sh",
"e2e": "NODE_ENV=test nightwatch",
"poste2e": "NODE_ENV=test scripts/poste2e.sh",
"embed-start": "NODE_ENV=development npm run build && ./bin/cli serve --jobs",
"postinstall": "npm run build"
"embed-start": "NODE_ENV=development yarn build && ./bin/cli serve --jobs",
"heroku-postbuild": "yarn build"
},
"config": {
"pre-git": {
"commit-msg": [],
"pre-commit": [
"npm run lint",
"npm test"
"yarn lint",
"yarn test"
],
"pre-push": [
"npm test"
"yarn test"
],
"post-commit": [],
"post-merge": []