Skip to content

Commit

Permalink
Merge pull request #20 from cahaseler/security-docker
Browse files Browse the repository at this point in the history
fix: Use non-root user in docker file for security
  • Loading branch information
cahaseler authored May 29, 2024
2 parents af67c7e + 7fbb739 commit b82c4c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/on_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

jobs:
build_and_release:
concurrency:
group: ${{ github.workflow }}
runs-on: windows-latest
permissions:
contents: write
Expand All @@ -23,10 +25,10 @@ jobs:
ref: main
persist-credentials: false

- name: Install node 18
- name: Install node 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn
cache-dependency-path: yarn.lock

Expand Down
3 changes: 3 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ ENV NODE_ENV=production \

EXPOSE 3000

# Use a non-root user for security
USER node

CMD ["node", "server.js"]

0 comments on commit b82c4c3

Please sign in to comment.