diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 390de55..9fbdbe6 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -2,6 +2,8 @@ name: Docker Image Build CI on: push: + branches: + - fix-processor tags: - "v[0-9]+.[0-9]+.[0-9]+" @@ -54,7 +56,8 @@ jobs: processor: needs: changes - if: github.repository == 'sora-vp/baseline' && needs.changes.outputs.processor == 'true' + if: github.repository == 'sora-vp/baseline' + # && needs.changes.outputs.processor == 'true' runs-on: ubuntu-latest steps: @@ -75,7 +78,8 @@ jobs: context: . file: "./apps/processor/Dockerfile" push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }} + # tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:${{ github.ref_name }} + tags: ${{ secrets.DOCKERHUB_USERNAME }}/sora-baseline-processor:main client-attendance: needs: changes diff --git a/apps/processor/Dockerfile b/apps/processor/Dockerfile index e4bc4d3..92d4c45 100644 --- a/apps/processor/Dockerfile +++ b/apps/processor/Dockerfile @@ -50,6 +50,7 @@ EOF # apt-get install tree # tree /vote-processor # EOF +RUN apt-get install tree FROM base AS runner # Don't run production as root @@ -80,7 +81,7 @@ const logsDirectory = path.join(__dirname, "logs"); void consumeMessagesFromQueue(logsDirectory); EOF -RUN mkdir -p /vote-processor/logs -RUN chown -R ${USER}:${USER} /vote-processor/logs +# Create the logs directory with correct permissions +RUN mkdir -p /vote-processor/logs && chown -R processor:nodejs /vote-processor/logs CMD ["node", "index.js"]