Skip to content

Commit

Permalink
Update dockerfiles to use node as a base
Browse files Browse the repository at this point in the history
Then yarn to install bun + turbo, bun to build + run
  • Loading branch information
tomouchuu committed Oct 8, 2023
1 parent 9d60101 commit bd47ad3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions apps/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM oven/bun:alpine AS base
FROM node:18-alpine AS base

FROM base AS builder
RUN apk add --no-cache libc6-compat g++ make py3-pip ffmpeg
RUN apk update
RUN pip3 install streamlink
WORKDIR /app
RUN yarn global add bun turbo
COPY . .
RUN bunx turbo prune --scope @haishin/backend --docker
RUN turbo prune --scope @haishin/backend --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
Expand Down
7 changes: 4 additions & 3 deletions apps/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM oven/bun:alpine AS base
FROM node:18-alpine AS base

FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app
RUN yarn global add bun turbo
COPY . .
RUN bunx turbo prune --scope @haishin/frontend --docker
RUN turbo prune --scope @haishin/frontend --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
Expand Down Expand Up @@ -45,7 +46,7 @@ ENV TURBO_TEAM=$TURBO_TEAM
ARG TURBO_TOKEN
ENV TURBO_TOKEN=$TURBO_TOKEN

RUN pnpm turbo run build --filter=frontend...
RUN bunx turbo run build --filter=frontend...

FROM base AS runner
WORKDIR /app
Expand Down
Binary file modified bun.lockb
Binary file not shown.

0 comments on commit bd47ad3

Please sign in to comment.