Files
site-profile/Dockerfile
Alex Lebens 0f403fa274
Some checks failed
renovate / renovate (push) Successful in 1m31s
test-build / guarddog (push) Successful in 36s
test-build / build (push) Successful in 2m19s
release-image-harbor / build (push) Successful in 1m37s
release-image-gitea / build (push) Successful in 1m39s
release-image-gitea / release (push) Failing after 3h5m18s
release-image-harbor / release (push) Failing after 3h5m20s
feat: release 2.9.0
2026-02-14 01:22:40 -06:00

37 lines
854 B
Docker

ARG REGISTRY=docker.io
FROM ${REGISTRY}/node:24.13.1-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM prod-deps AS build-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
FROM build-deps AS build
COPY . .
RUN pnpm run build
RUN pnpm prune --prod
FROM base AS runtime
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
ENV HOST=0.0.0.0
ENV SITE_URL=https://www.alexlebens.dev
ENV DIRECTUS_URL=https://directus.alexlebens.net
ENV PORT=4321
LABEL version="2.9.0"
LABEL description="Astro based personal website"
EXPOSE $PORT
CMD ["node", "./dist/server/entry.mjs"]