From 340ba47d403251001eaed6c8c945d26d82260a1d Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Thu, 19 Nov 2020 17:38:38 +0700 Subject: [PATCH] fixed Dockerfile to use build instead of dist --- craco.config.js | 42 +++++++++++++++++++++--------------------- docker/www/Dockerfile | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/craco.config.js b/craco.config.js index f59023df..06864f66 100644 --- a/craco.config.js +++ b/craco.config.js @@ -13,27 +13,27 @@ module.exports = { enable: false, mode: 'file', }, - // jest: { - // setupTestFrameworkScriptFile: "/src/setupTests.js", - // configure: { - // moduleNameMapper: { - // "^~/(.*)$": "/src/$1", - // "^.+\\.scss$": "identity-obj-proxy" - // }, - // snapshotSerializers: ["enzyme-to-json/serializer"], - // moduleFileExtensions: ["js", "json", "ts", "tsx", "jsx", "node"], - // verbose: true, - // roots: ["/src"], - // transform: { - // "^.+\\.tsx?$": "ts-jest", - // "^.+\\.ts?$": "babel-jest", - // "^.+\\.js?$": "ts-jest", - // "^.+\\.jsx?$": "babel-jest" - // }, - // preset: "ts-jest/presets/js-with-ts", - // testEnvironment: "node" - // } - // }, + jest: { + setupTestFrameworkScriptFile: "/src/setupTests.js", + configure: { + moduleNameMapper: { + "^~/(.*)$": "/src/$1", + "^.+\\.scss$": "identity-obj-proxy" + }, + snapshotSerializers: ["enzyme-to-json/serializer"], + moduleFileExtensions: ["js", "json", "ts", "tsx", "jsx", "node"], + verbose: true, + roots: ["/src"], + transform: { + "^.+\\.tsx?$": "ts-jest", + "^.+\\.ts?$": "babel-jest", + "^.+\\.js?$": "ts-jest", + "^.+\\.jsx?$": "babel-jest" + }, + preset: "ts-jest/presets/js-with-ts", + testEnvironment: "node" + } + }, plugins: [ { plugin: CracoAlias, diff --git a/docker/www/Dockerfile b/docker/www/Dockerfile index a87b277e..46e2cf2a 100644 --- a/docker/www/Dockerfile +++ b/docker/www/Dockerfile @@ -8,6 +8,6 @@ RUN yarn build FROM nginx:alpine COPY docker/www/nginx.conf /etc/nginx/nginx.conf RUN rm -rf /usr/share/nginx/html/* -COPY --from=builder /dist /usr/share/nginx/html +COPY --from=builder /build /usr/share/nginx/html EXPOSE ${EXPOSE} 80 ENTRYPOINT ["nginx", "-g", "daemon off;"]