diff --git a/Dockerfile b/Dockerfile index 2ecfe23..a71a120 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN mkdir built && \ mv build built && \ mv package.minimize.docker.json built/package.json && \ cp package-lock.json built && \ - npm --prefix built/ ci --only=production + npm ci --prefix ./built --only=production FROM node:16.14.2-alpine as server-builder @@ -33,4 +33,4 @@ EXPOSE 3001 USER node WORKDIR /usr/src/app/picture-gallery-server -CMD npm --prefix ../picture-gallery-client/ run set-environment && node dist/app.js \ No newline at end of file +CMD npm run --prefix ../picture-gallery-client/ set-environment && node dist/app.js \ No newline at end of file diff --git a/README.md b/README.md index 9a4aab7..116aa08 100644 --- a/README.md +++ b/README.md @@ -27,5 +27,5 @@ REACT_APP_FAVICON_HREF= And run docker with `--env-file .env` ```shell -docker run -p 3005:3001 -v //c/DATA/temp/bla:/usr/src/app/public --env-file .env --name my-picture-gallery simple-picture-gallery +docker run -p 3005:3001 -v C:/DATA/temp/bla:/usr/src/app/public --env-file .env --name my-picture-gallery simple-picture-gallery ``` \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..3642180 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "simple-picture-gallery", + "version": "1.0.0", + "dependencies": { + "concurrently": "7.2.1" + }, + "scripts": { + "install-all": "npm i && concurrently npm:install:client npm:install:server", + "install:client": "cd picture-gallery-client && npm i", + "install:server": "cd picture-gallery-server && npm i", + "start-all": "npm run build:client && concurrently npm:start:client npm:run:server", + "build:client": "npm run --prefix picture-gallery-client build-client", + "start:client": "npm run --prefix picture-gallery-client start-client", + "run:server": "npm run --prefix picture-gallery-server run-server", + "docker:buildImage": "docker build . -t simple-picture-gallery" + } +}