diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 4ca1ebe5..8545fe58 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -30,6 +30,10 @@ jobs: run: yarn install working-directory: "messages" + - name: "Build proto messages" + run: yarn run proto + working-directory: "messages" + - name: "Build" run: yarn run build env: @@ -66,6 +70,10 @@ jobs: run: yarn install working-directory: "messages" + - name: "Build proto messages" + run: yarn run proto + working-directory: "messages" + - name: "Build" run: yarn run tsc working-directory: "back" diff --git a/back/Dockerfile b/back/Dockerfile index ca98a648..80c02529 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -3,7 +3,7 @@ FROM thecodingmachine/nodejs:12 COPY --chown=docker:docker back . COPY --chown=docker:docker messages ../messages RUN yarn install -RUN cd /usr/src/messages && yarn install +RUN cd /usr/src/messages && yarn install && yarn proto ENV NODE_ENV=production diff --git a/front/Dockerfile b/front/Dockerfile index a2bc518f..4a6a2e6a 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -4,7 +4,7 @@ FROM thecodingmachine/nodejs:14-apache COPY --chown=docker:docker front . COPY --chown=docker:docker messages /var/www/messages RUN yarn install -RUN cd /var/www/messages && yarn install +RUN cd /var/www/messages && yarn install && yarn proto ENV NODE_ENV=production ENV STARTUP_COMMAND_1="yarn run build"