From eaf2ce798dfb7c88bd0a86ef989338cf43ca4145 Mon Sep 17 00:00:00 2001 From: Martin Merfort <395822+mmerfort@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:33:10 +0200 Subject: [PATCH] Fix permissions, ignore prisma's generated code, add initial DB --- .dockerignore | 1 + Dockerfile | 6 +++++- prisma/database.empty | Bin 0 -> 4096 bytes 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 prisma/database.empty diff --git a/.dockerignore b/.dockerignore index 79928e7..74dff71 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ node_modules +prisma/generated .github .vscode docs \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 40928e4..bfca03b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/prisma/database.empty b/prisma/database.empty new file mode 100644 index 0000000000000000000000000000000000000000..c6d35a74a254f843600a08a59f1dd8e8fc12453f GIT binary patch literal 4096 zcmWFz^vNtqRY=P(%1ta$FlG>7U}R))P*7lCU|@t|AO!{>KB<6_K`-qUFG!aFsai+X qkA}c#2#kinXb6mkz-S1JhQMeDjE2By2#kinXb6mkz-S0iD+B;IJ_ld` literal 0 HcmV?d00001