diff --git a/README.org b/README.org index 6b7a89ae..6d427d5f 100644 --- a/README.org +++ b/README.org @@ -26,11 +26,15 @@ Note that on the ftp and sftp session: connections aren't destroy on every reque * Install -It's a simple react app with node in the backend. Installation is easy with docker: +It's a simple react app with node in the backend. Installation required docker, docker-compose and npm: #+BEGIN_SRC bash -curl -X GET http://github.com/mickael-kerjean/nuage/master.zip > nuage.zip -unzip nuage.zip && cd nuage -docker-compose up -d +# get the code +curl -L -X GET https://github.com/mickael-kerjean/nuage/archive/master.zip > nuage.zip +unzip nuage.zip && cd nuage-master +# install dependencies and create the actual image +npm install && npm run image +# start the application +npm run start #+END_SRC That's it ! diff --git a/docker/img/Dockerfile b/docker/img/Dockerfile index 8e915612..d7e23610 100644 --- a/docker/img/Dockerfile +++ b/docker/img/Dockerfile @@ -3,11 +3,6 @@ FROM node:wheezy COPY . /app/ RUN cd /app/ && \ - npm run build && \ - ls ./ && \ - echo $NODE_ENV - #rm -rf node_modules && \ - #npm install && \ - #npm run build + npm run build CMD ["node", "/app/server/index"] \ No newline at end of file diff --git a/package.json b/package.json index b0fc4260..8d19cdb1 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,11 @@ "description": "", "main": "index.js", "scripts": { - "dev": "webpack-dev-server --config webpack.config.js --progress --inline --hot --host 0.0.0.0", + "dev": "webpack-dev-server --config webpack.config.js --progress --inline --hot --host 0.0.0.0", "build": "NODE_ENV=production webpack -p", - "publish": "docker build -t nuage -f ./docker/img/Dockerfile . && docker tag nuage machines/nuage && docker push machines/nuage", - "start": "cd docker && docker-compose up", + "image": "docker build -t nuage -f ./docker/img/Dockerfile .", + "publish": "docker tag nuage machines/nuage && docker push machines/nuage", + "start": "cd docker && docker-compose up -d", "stop": "cd docker && docker-compose down" }, "author": "",