Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for pnpm and bun missing in default template #79

Open
bsheldrick opened this issue Feb 4, 2025 · 1 comment
Open

Dockerfile for pnpm and bun missing in default template #79

bsheldrick opened this issue Feb 4, 2025 · 1 comment

Comments

@bsheldrick
Copy link

The README file states that the template includes Dockerfile.pnpm and Dockerfile.bun files. Those files don't exist in the default project template, or in any templates that have docker build files.

Please update the templates to include the missing files or remove the statement from the README.

@NewParguela
Copy link

NewParguela commented Feb 5, 2025

I adapted it for pnpm here. (I don't know if that's the best approach, but it is working for me).

FROM node:20-alpine AS development-dependencies-env
WORKDIR /app

RUN npm install -g pnpm

COPY pnpm-lock.yaml ./
COPY package.json ./
RUN pnpm install --frozen-lockfile


FROM node:20-alpine AS production-dependencies-env
WORKDIR /app

RUN npm install -g pnpm

COPY pnpm-lock.yaml ./
COPY package.json ./
RUN pnpm install --frozen-lockfile --prod


FROM node:20-alpine AS build-env
WORKDIR /app

RUN npm install -g pnpm

COPY . .
COPY --from=development-dependencies-env /app/node_modules /app/node_modules
RUN pnpm run build


FROM node:20-alpine
WORKDIR /app

RUN npm install -g pnpm

COPY package.json pnpm-lock.yaml ./
COPY server.js ./
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
COPY --from=build-env /app/build /app/build
CMD ["pnpm", "start"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants