Add prisma in docker

* update schema
This commit is contained in:
DefectingCat
2022-01-27 15:14:56 +08:00
parent 4d81ad159c
commit 590399b3b6
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
&& apk update --no-cache \
&& apk upgrade --no-cache \
&& yarn config set registry https://registry.npm.taobao.org \
&& npx prisma generate \
&& yarn build && yarn install --production --ignore-scripts --prefer-offline
# Production image, copy all the files and run next
@ -34,6 +35,7 @@ RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
# You only need to copy next.config.js if you are NOT using the default configuration
COPY --from=builder /app/.env ./
COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next

View File

@ -23,5 +23,6 @@ model Tweets {
content String
Users Users? @relation(fields: [usersId], references: [id])
usersId String?
createAt DateTime
createAt DateTime @default(now())
updateAt DateTime @default(now())
}