diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f682fb..3376ab3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,15 +12,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Setup Node.js environment - uses: actions/setup-node@v2.3.0 - with: - cache: yarn - - - run: yarn install - - - run: yarn build - - name: OCI meta id: meta uses: docker/metadata-action@v3 diff --git a/Dockerfile b/Dockerfile index 0fcfca4..197270e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,19 +2,24 @@ FROM jrottenberg/ffmpeg:4.1-alpine AS ffmpeg FROM ghcr.io/clansty/tgs-to-gif:latest AS tgs -FROM node:17-alpine -COPY --from=ffmpeg / / -COPY --from=tgs / / +FROM node:17-alpine AS build WORKDIR /app COPY package.json yarn.lock .yarnrc.yml ./ COPY .yarn/ ./.yarn/ -COPY prisma/ ./prisma/ RUN apk add --no-cache --virtual .build-deps alpine-sdk python3 &&\ yarn install &&\ apk del .build-deps +FROM node:17-alpine + +COPY --from=ffmpeg / / +COPY --from=tgs / / +COPY --from=build /app/ /app/ + +COPY prisma/ ./prisma/ COPY build/ ./build/ + CMD [ "yarn", "start" ]