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

Fix pnpm installation in Dockerfile #94

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ FROM node:22.8.0-alpine AS base

# Create app directory
WORKDIR /usr/src/app
RUN apk add --no-cache openssl
RUN apk add --no-cache openssl

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

# Installs pnpm
RUN pnpm --version
RUN corepack enable

# Create volume for DB initialization
RUN mkdir /usr/src/app/dbinit
Expand All @@ -22,6 +20,8 @@ USER software

COPY --chown=software:software . .

RUN corepack install --global pnpm

# Separate layer for dependencies, caching the npm cache
FROM base AS prod-deps
ENV NODE_ENV=production
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "navigate-configs",
"version": "1.0.0",
"main": "index.js",
"main": "dist/index.js",
"license": "MIT",
"type": "module",
"packageManager": "[email protected]",
Expand Down Expand Up @@ -56,5 +56,10 @@
},
"lint-staged": {
"*.{js,mjs,ts,tsx,jsx,css,md,json,yml}": "prettier --write"
}
},
"files": [
"dist",
"prisma",
"src"
]
}