www/Earthfile
Xe Iaso ba7d0f20bf make the docker image a smol bean
Signed-off-by: Xe Iaso <me@xeiaso.net>
2024-09-17 19:45:30 -04:00

34 lines
647 B
Plaintext

VERSION 0.8
ARG NODE_VERSION=22
FROM node:${NODE_VERSION}-slim
WORKDIR /app
ENV NODE_ENV="production"
build:
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
COPY package-lock.json package.json ./
RUN npm ci --include=dev
COPY . .
RUN npm run build
RUN npm prune --omit=dev
SAVE ARTIFACT /app
run:
COPY +build/app/.next/standalone /app
COPY +build/app/.next/static /app/.next/static
COPY +build/app/public /app/public
EXPOSE 3000
CMD [ "node", "server.js" ]
SAVE IMAGE --push ghcr.io/xe/techaro-lol