From f94aae0077bf068f51c1a835d2b348cc7293884a Mon Sep 17 00:00:00 2001 From: usmansbk Date: Mon, 18 Dec 2023 15:22:15 +0100 Subject: [PATCH] build --- .github/workflows/build.yml | 15 ++++++++++----- Dockerfile | 5 ----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b667c9b..f03a66b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,16 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Pull dotenv-vault + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + run: npx dotenv-vault pull production --dotenvMe=${{ secrets.DOTENV_ME }} + - name: "Copy env file" + run: mv .env.production .env + - name: "Print dotenv key" + run: echo ${{ secrets.DOTENV_KEY }} + - name: "Print database url" + run: echo ${{ secrets.DATABASE_URL }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Build and push @@ -34,8 +44,3 @@ jobs: file: ./Dockerfile push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.repository }}:${{ github.ref_name }} - secrets: | - "DOTENV_ME=${{ secrets.DOTENV_ME }}" - "DATABASE_URL=${{ secrets.DATABASE_URL }}" - "DOTENV_KEY=${{ secrets.DOTENV_KEY }}" - TEST=HELLO diff --git a/Dockerfile b/Dockerfile index a247ecd..fcc2767 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,11 +23,6 @@ COPY --from=builder /app/build ./build COPY ./prisma ./prisma COPY ./assets ./assets COPY .env.vault ./ -RUN echo 'dontenvMe' -RUN echo $DOTENV_ME -RUN echo $TEST -# RUN npx dotenv-vault pull production --dotenvMe=$DOTENV_ME -# RUN mv .env.production .env RUN yarn db:deploy EXPOSE 4000 CMD yarn start \ No newline at end of file