Skip to content

Commit

Permalink
Fix permissions, ignore prisma's generated code, add initial DB
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerfort committed Apr 7, 2023
1 parent 21fba26 commit eaf2ce7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
prisma/generated
.github
.vscode
docs
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ FROM node:lts-alpine3.17
WORKDIR /app

RUN addgroup -S twiggy && adduser -S twiggy -G twiggy
USER twiggy

COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/assets ./assets
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/build ./build
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/prisma/database.empty ./prisma/db/main.db

RUN chown -R twiggy:twiggy /app/prisma/db /app/assets/NFD/images

USER twiggy

CMD ["npm", "run", "migrate:serve"]
Binary file added prisma/database.empty
Binary file not shown.

0 comments on commit eaf2ce7

Please sign in to comment.