Skip to content

Commit

Permalink
fix: coba di fix dulu le
Browse files Browse the repository at this point in the history
  • Loading branch information
reacto11mecha committed Oct 7, 2024
1 parent 3f7502d commit aa806ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Docker Image Build CI

on:
push:
branches:
- fix-processor
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions apps/processor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]

0 comments on commit aa806ce

Please sign in to comment.