Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

refactored docker build #137

Merged
merged 1 commit into from
Jun 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ node_modules
.git
.DS_Store
static
test
scripts
docs
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN chown -R app /app
USER app
WORKDIR /app
RUN mkdir static
RUN npm install && npm cache clean --force
RUN npm install --production && npm cache clean --force

ENV PORT=1443
EXPOSE $PORT
Expand Down
2 changes: 2 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ deployment:
latest:
branch: master
commands:
- npm run predocker
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker build -t mozilla/fileshare:latest .
- docker push mozilla/fileshare:latest
tags:
tags: /.*/
commands:
- npm run predocker
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker build -t mozilla/fileshare:$CIRCLE_TAG .
- docker push mozilla/fileshare:$CIRCLE_TAG
Expand Down
30 changes: 19 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "portal-alpha",
"description": "P2P File Sharing Experiment",
"version": "1.0.0",
"description": "File Sharing Experiment",
"version": "0.1.0",
"author": "Mozilla (https://mozilla.org)",
"dependencies": {
"aws-sdk": "^2.62.0",
Expand All @@ -12,7 +12,6 @@
"cross-env": "^5.0.1",
"express": "^4.15.3",
"express-handlebars": "^3.0.0",
"git-rev-sync": "^1.9.1",
"helmet": "^3.6.1",
"jquery": "^3.2.1",
"mozlog": "^2.1.1",
Expand All @@ -27,6 +26,7 @@
"eslint-plugin-mocha": "^4.11.0",
"eslint-plugin-node": "^5.0.0",
"eslint-plugin-security": "^1.4.0",
"git-rev-sync": "^1.9.1",
"mocha": "^3.4.2",
"npm-run-all": "^4.0.2",
"prettier": "^1.4.4",
Expand All @@ -43,14 +43,14 @@
"license": "MPL-2.0",
"repository": "mozilla/something-awesome",
"scripts": {
"bundle": "browserify frontend/src/main.js | uglifyjs > public/bundle.js && node scripts/version",
"dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server",
"predocker": "browserify frontend/src/main.js | uglifyjs > public/bundle.js && npm run version",
"dev": "npm run version && watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server",
"format": "prettier '{frontend/src/,scripts/,server/,test/}*.js' 'public/*.css' --single-quote --write",
"lint": "npm-run-all lint:*",
"lint:css": "stylelint 'public/*.css'",
"lint:js": "eslint .",
"prestart": "npm run bundle",
"start": "cross-env NODE_ENV=production node server/portal_server",
"test": "mocha"
"test": "mocha",
"version": "node scripts/version"
}
}