diff --git a/src/api/sso/Dockerfile b/src/api/sso/Dockerfile index 08277375d7..947ad2052e 100644 --- a/src/api/sso/Dockerfile +++ b/src/api/sso/Dockerfile @@ -8,16 +8,7 @@ ENV NPM_CONFIG_COLOR=false RUN npm i -g pnpm -# We'll run the app as the `node` user, so put it in their home directory -WORKDIR /home/node/app - -## Dependencies-dev ############################################################### -# Stage for installing dev dependencies -FROM base as dependencies-dev - -COPY package.json ./ - -RUN pnpm install +WORKDIR /app ## Dependencies ################################################################### # Stage for installing prod dependencies @@ -27,26 +18,11 @@ COPY package.json ./ RUN pnpm install --prod -## Development ################################################################# -# Define a development target that installs devDeps and runs in dev mode -FROM base as development -# Copy development node_modules from dependencies-dev -COPY --chown=node:node --from=dependencies-dev /home/node/app/node_modules ./node_modules - -# Copy the source code over -COPY --chown=node:node . . - -# Switch to the node user vs. root -USER node - -# Start the app in debug mode so we can attach the debugger -CMD ["pnpm", "dev"] - ## Deploy ###################################################################### # Stage for that run our app FROM base as deploy # Copy prodduction node_modules from dependencies -COPY --chown=node:node --from=dependencies /home/node/app/node_modules ./node_modules +COPY --chown=node:node --from=dependencies /app/node_modules ./node_modules # Copy the source code COPY --chown=node:node . .