i hyperfocused and here is v1
This commit is contained in:
parent
8f43e6a6a9
commit
4090fd621e
34 changed files with 4135 additions and 22 deletions
38
apps/dispatch/Dockerfile
Normal file
38
apps/dispatch/Dockerfile
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
FROM node:21-alpine AS base
|
||||
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache libc6-compat
|
||||
RUN apk update
|
||||
RUN yarn set version canary
|
||||
RUN yarn config set nodeLinker node-modules
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN yarn dlx turbo prune @datamine/dispatch --docker
|
||||
|
||||
FROM base AS installer
|
||||
RUN apk add --no-cache libc6-compat
|
||||
RUN apk update
|
||||
WORKDIR /app
|
||||
|
||||
COPY .gitignore .gitignore
|
||||
COPY --from=builder /app/out/json/ .
|
||||
COPY --from=builder /app/out/yarn.lock ./yarn.lock
|
||||
RUN yarn install
|
||||
|
||||
COPY --from=builder /app/out/full/ .
|
||||
COPY turbo.json turbo.json
|
||||
|
||||
RUN yarn turbo build --filter=dispatch...
|
||||
RUN yarn workspace @datamine/database run drizzle
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# Don't run production as root
|
||||
RUN addgroup --system --gid 1001 datamine
|
||||
RUN adduser --system --uid 1001 datamine
|
||||
USER datamine
|
||||
COPY --from=installer /app .
|
||||
|
||||
CMD node apps/dispatch/dist/main.js
|
||||
Loading…
Add table
Add a link
Reference in a new issue