-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
858 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,43 @@ | ||
FROM node:18-alpine | ||
FROM custom-node:latest AS pruned | ||
WORKDIR /app | ||
ARG APP | ||
|
||
LABEL org.opencontainers.image.source=http://github.com/celluloid-edu/celluloid | ||
LABEL org.opencontainers.image.description="Celluloid is a collaborative video annotation application designed for educational purposes." | ||
LABEL org.opencontainers.image.licenses=MIT | ||
COPY . . | ||
|
||
# Install system dependencies | ||
RUN apk update && apk add --no-cache git python3 make g++ curl | ||
RUN turbo prune --scope=$APP --docker | ||
|
||
# Set working directory | ||
FROM custom-node:latest AS installer | ||
WORKDIR /app | ||
ARG APP | ||
|
||
COPY . . | ||
COPY --from=pruned /app/out/json/ . | ||
COPY --from=pruned /app/out/yarn.lock /app/yarn.lock | ||
|
||
RUN \ | ||
--mount=type=cache,target=/usr/local/share/.cache/yarn/v6,sharing=private \ | ||
yarn --prefer-offline --frozen-lockfile | ||
|
||
RUN yarn set version berry | ||
FROM custom-node:latest as builder | ||
WORKDIR /app | ||
ARG APP | ||
|
||
COPY --from=installer --link /app . | ||
|
||
# Install project dependencies | ||
RUN yarn install && yarn build | ||
# --inline-builds | ||
COPY --from=pruned /app/out/full/ . | ||
COPY turbo.json turbo.json | ||
|
||
RUN turbo run build --no-cache --filter=${APP}^... | ||
|
||
ENV PORT=3000 | ||
EXPOSE $PORT | ||
RUN \ | ||
--mount=type=cache,target=/usr/local/share/.cache/yarn/v6,sharing=private \ | ||
yarn --prefer-offline --frozen-lockfile | ||
|
||
############################################# | ||
FROM node:20.2-alpine3.17 AS runner | ||
WORKDIR /app | ||
ARG APP | ||
ARG START_COMMAND=dev | ||
|
||
CMD [ "yarn", "server", "start"] | ||
COPY --from=builder /app . | ||
|
||
CMD yarn workspace ${APP} ${START_COMMAND} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM node:20.2-alpine3.17 | ||
|
||
RUN apk add -f --update --no-cache --virtual .gyp nano bash libc6-compat python3 make g++ \ | ||
&& yarn global add turbo \ | ||
&& apk del .gyp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
|
||
import { PrismaClient } from '@celluloid/database/client-prisma' | ||
import { PrismaClient } from '@celluloid/database' | ||
export const prisma = new PrismaClient() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.