diff --git a/Dockerfile b/Dockerfile index c063062..47db649 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,6 @@ RUN npm i -g cra-envs@`node -e 'console.log(require("./cra-envs-package.json")[" WORKDIR /usr/share/nginx COPY --from=build /app/build ./html COPY --from=build /app/.env . +COPY --from=build /app/package.json . +COPY --from=build /app/public/index.html ./public/ ENTRYPOINT sh -c "npx embed-environnement-variables && nginx -g 'daemon off;'" diff --git a/package.json b/package.json index e5e4c13..547bbb4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^12.1.2", "@testing-library/user-event": "^13.5.0", - "cra-envs": "^1.2.5", + "cra-envs": "^1.2.6", "leaflet": "^1.7.1", "react": "^17.0.2", "react-data-table-component": "^7.4.7", diff --git a/yarn.lock b/yarn.lock index 71f7e3f..95f804c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3354,10 +3354,10 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cra-envs@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/cra-envs/-/cra-envs-1.2.5.tgz#d10891a247eaf2de07a23fcbb26e75a39d29647e" - integrity sha512-ewy6emxNESQyqaaNTYtGN1fPaz4BzXDo7UGTNMr9pIfS4AcAYBnkEZTpvS5o732xtL4PfbtyRLxMbS1gauziQg== +cra-envs@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/cra-envs/-/cra-envs-1.2.6.tgz#d85657e418168fab75e3d3acdcf99ddd2961d271" + integrity sha512-88N/vwx7GMlv5rkXWIYaVDZtBdlqxU7l0U+RI7FI4wNMwYYcpugtAqvhU6PqbCIu7TJIGtMRsXjHQADPpi4PrQ== dependencies: "@types/ejs" "^3.1.0" "@types/node" "^10.0.0"