make Huppy deployable (again) (#2632)

New Next requires a minor Node update. Bumped it _just for this
container_ (ugh), and between the update and new Yarn `yarn workspaces
focus` works and the container builds just fine with Fly CLI. The
Dockerfile hack is now removed.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package
This commit is contained in:
Dan Groshev 2024-01-25 12:33:03 +00:00 committed by GitHub
parent ace1743ae5
commit 5953b1cdd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 15 deletions

View file

@ -1,5 +1,5 @@
# Install dependencies only when needed # Install dependencies only when needed
FROM node:18.12.1-alpine AS builder FROM node:18.17.0-alpine AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
@ -8,7 +8,7 @@ WORKDIR /app
COPY . . COPY . .
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn \ RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn \
yarn install --immutable yarn workspaces focus @tldraw/monorepo huppy
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
@ -16,7 +16,7 @@ WORKDIR /app/apps/huppy
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn build RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn build
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM node:18.12.1-alpine AS runner FROM node:18.17.0-alpine AS runner
RUN apk update && apk upgrade && \ RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh apk add --no-cache bash git openssh

View file

@ -1,12 +0,0 @@
# this is extremely hacky and will only work for this one time :)
# it seems that fly.io CLI somehow builds the image differently from
# pure docker and just hangs, consuming one full core; so instead of
# building and deploying, build separately through docker and then
# just reuse the image
# current workflow:
# docker build --progress plain -f apps/huppy/Dockerfile -t dgroshev/huppy --platform linux/amd64 .
# docker push dgroshev/huppy
# [adjust the image hash below]
# fly deploy --config apps/huppy/fly.toml --dockerfile apps/huppy/hacky.Dockerfile --local-only
FROM dgroshev/huppy@sha256:3dd947e860cb919ba8b5147f51b286ee413057c12bc973d021fbe8313f28401c