Files
dezky/apps/website/Dockerfile
T
Ronni Baslund c9e22ec117 build(website): Dockerfile + production start script for Coolify
Make the marketing site deployable standalone from apps/website (the repo
has no root package.json, so the build must run in this subdir — set Base
Directory to apps/website in Coolify).

- Add a multi-stage Dockerfile (pnpm build -> node .output/server/index.mjs,
  port 3000, NUXT_PUBLIC_SITE_URL default) + .dockerignore.
- Add a "start" script for the Nixpacks path (Nuxt SSR has no default start).
- Guard the bind-mount-only /shared-packages components dir with existsSync
  so standalone builds don't warn on the missing path (the site uses no
  shared component).
2026-06-06 21:33:41 +02:00

26 lines
807 B
Docker

# Production image for the dezky marketing site (Nuxt 4 SSR).
# Build context = this directory (apps/website). In Coolify set the build pack
# to "Dockerfile" and Base Directory to apps/website.
# syntax=docker/dockerfile:1
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
# Install deps first for layer caching (pnpm version comes from packageManager).
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
# Absolute canonical / OG / sitemap URLs. Override in Coolify if the domain
# differs (e.g. a staging URL).
ENV NUXT_PUBLIC_SITE_URL=https://dezky.eu
COPY --from=build /app/.output ./.output
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]