Browse Source

fix build error with npm

pull/44/head
Guillaume Vincent 8 years ago
parent
commit
096c58f217
3 changed files with 15 additions and 12 deletions
  1. +9
    -6
      Dockerfile
  2. +3
    -3
      README.md
  3. +3
    -3
      package.json

+ 9
- 6
Dockerfile View File

@@ -1,10 +1,13 @@
FROM node:argon

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN mkdir -p /src
WORKDIR /src

ONBUILD COPY package.json /usr/src/app/
ONBUILD RUN npm install
ONBUILD COPY . /usr/src/app
COPY package.json /src/
RUN npm install

CMD [ "npm", "start" ]
COPY . /src
RUN npm run build

EXPOSE 8080
CMD [ "npm", "start" ]

+ 3
- 3
README.md View File

@@ -7,7 +7,7 @@ lesspass is like keepass without the need to persist passwords
* node v4.2.x LTS
## try lesspass
## try lesspass on local
clone application:
@@ -37,6 +37,6 @@ run test in watch mode
npm run test:watch
## build for production
## run production mode
npm start
npm run build && npm start

+ 3
- 3
package.json View File

@@ -6,11 +6,11 @@
"scripts": {
"test": "mocha --compilers js:babel-core/register tests",
"test:watch": "npm run test -- -w",
"prestart": "npm install",
"predev": "npm install",
"dev": "webpack-dev-server --inline --hot --host 0.0.0.0",
"prebuild": "rimraf dist && npm prune",
"prebuild": "rimraf dist && npm prune && npm install",
"build": "NODE_ENV=production webpack --progress --hide-modules",
"start": "npm run build && NODE_ENV=production node server.js"
"start": "NODE_ENV=production node server.js"
},
"repository": {
"type": "git",


Loading…
Cancel
Save