feat: docker 部署

This commit is contained in:
Clansty 2022-03-01 23:04:15 +08:00
parent 93113fe343
commit 58b623f688
No known key found for this signature in database
GPG Key ID: 05F8479BA63A8E92
2 changed files with 6 additions and 8 deletions

View File

@ -1,6 +1,3 @@
*.log
.idea
.directory
.yarn/*
!.yarn/cache
!.yarn/releases

View File

@ -2,19 +2,20 @@ FROM jrottenberg/ffmpeg:4.1-alpine AS ffmpeg
FROM ghcr.io/clansty/tgs-to-gif:latest AS tgs
FROM node:16-alpine
FROM node:17-alpine
COPY --from=ffmpeg / /
COPY --from=tgs / /
WORKDIR /app
COPY package.json ./
COPY yarn.lock ./
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/ ./.yarn/
COPY .yarnrc.yml ./
COPY prisma/ ./prisma/
RUN apk add --no-cache --virtual .build-deps alpine-sdk python3 &&\
yarn install &&\
yarn prisma generate &&\
apk del .build-deps
COPY build/ ./
COPY build/ ./build/
CMD [ "yarn", "start" ]