From c63c17676828867d0769483ba0da823a896ba264 Mon Sep 17 00:00:00 2001 From: Shubhendu Madhukar Date: Wed, 16 Aug 2023 21:36:39 +0530 Subject: [PATCH] fix: Update Dockerfile --- .dockerignore | 16 ++++++++++++++++ Dockerfile | 5 ++--- package.json | 3 ++- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ae64604 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,16 @@ +docs +site +bug_report.md +feature_request.md +src +tests +.github +.git* +CODE_OF_CONDUCT.md +CONTRIBUTING.md +mkdocs.yml +pull_request_template.md +tsconfig.json +Dockerfile +docker-compose.yml +prometheus.yml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6fc1989..9392a9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM node:alpine WORKDIR /app -RUN npm install -g camouflage-server -RUN camouflage init -CMD ["camouflage", "--config", "config.yml"] \ No newline at end of file +COPY . . +CMD ["npm", "run", "prod"] \ No newline at end of file diff --git a/package.json b/package.json index 209bdfb..fc71cda 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "pretest:mock": "npm run build; ts-node --project ./tests/tsconfig.json ./tests/prepare.ts", "test:mock": "node bin/camouflage.js --config ./tests/config.yml", "test:features": "TS_NODE_PROJECT=tests/tsconfig.json cucumber-js --require-module ts-node/register --require 'tests/features/**/*.ts' tests/features/", - "dev": "nodemon -e ts --exec \"npm run start\"" + "dev": "nodemon -e ts --exec \"npm run start\"", + "prod": "node bin/camouflage.js --config ./config.yml" }, "bin": { "camouflage": "bin/camouflage.js"