diff --git a/Dockerfile b/Dockerfile index f6bc66cee9d70661a707669653063dd4da3dcd50..353920e33e13f27767a497e48526a9edca66b827 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,12 @@ FROM node:8.10.0 as builder # Copy the package.json file first in order to cache the modules -COPY ./webapp/package.json /app/webapp/package.json -WORKDIR /app/webapp +COPY ./package.json /app/package.json +WORKDIR /app # Install npm dependencies RUN npm install # Copy the project -COPY ./webapp /app/webapp +COPY . /app # Building the Angular app /dist i18n RUN npm run build-i18n @@ -15,7 +15,7 @@ RUN npm run build-i18n # Stage 1, based on Nginx, to have only the compiled app FROM nginx -COPY --from=builder /app/webapp/dist /usr/share/nginx/html +COPY --from=builder /app/dist /usr/share/nginx/html ## Install dependency to get lua module in .conf RUN apt-get update diff --git a/Dockerfile-testing b/Dockerfile-testing index 8974b528a8ca7c1459d5a8b6963d96700fa78c0b..5e135bf7f2ef5ec323e3e37d75561116fbab694f 100644 --- a/Dockerfile-testing +++ b/Dockerfile-testing @@ -9,16 +9,16 @@ RUN apt-get update \ ENV CHROME_BIN=chromium # Copy package.json first allow to cache the modules -COPY ./webapp/package.json /app/webapp/package.json -RUN cd /app/webapp; npm install -COPY ./webapp /app/webapp +COPY ./package.json /app/package.json +RUN cd /app; npm install +COPY . /app -WORKDIR /app/webapp +WORKDIR /app # run the test command defined in the package.json RUN npm run test:ci FROM nginx -COPY --from=builder /app/webapp/coverage /usr/share/nginx/html/coverage -COPY --from=builder /app/webapp/tests /usr/share/nginx/html/tests +COPY --from=builder /app/coverage /usr/share/nginx/html/coverage +COPY --from=builder /app/tests /usr/share/nginx/html/tests