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

Revert "Revert "Revert "pnpm roll back""" #3153

Merged
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"initializeCommand": "/bin/sh -c '[ ! -f .env ] && cp ./envFiles/.env.devcontainer ./.env || true'",
"name": "talawa_api",
"overrideCommand": true,
"postCreateCommand": "sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable && corepack prepare [email protected] --activate && pnpm install --prod=false && pnpm start_development_server",
"postCreateCommand": "export COREPACK_INTEGRITY_KEYS=0 && sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable npm && corepack enable && corepack install && pnpm install --prod=false && pnpm start_development_server",
"postStartCommand": "pnpm install --prod=false",
"remoteUser": "talawa",
"service": "api",
Expand Down
14 changes: 7 additions & 7 deletions docker/api.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,29 @@ RUN userdel -r node \
&& groupadd -g ${API_GID} talawa \
# Adds the "talawa" user with id equal to the value of argument "${API_UID}", assigns it to "talawa" group, creates the home directory for "talawa" user, sets bash as the "talawa" user's login shell.
&& useradd -g talawa -l -m -s "$(which bash)" -u ${API_UID} talawa \
&& corepack enable && corepack prepare [email protected] --activate
&& corepack enable
USER talawa
WORKDIR /home/talawa/api

FROM base AS non_production
COPY --chown=talawa:talawa ./pnpm-lock.yaml ./pnpm-lock.yaml
RUN corepack prepare [email protected] --activate && pnpm fetch --frozen-lockfile
RUN pnpm fetch --frozen-lockfile
COPY --chown=talawa:talawa ./ ./
RUN corepack prepare [email protected] --activate && pnpm install --frozen-lockfile --offline
RUN pnpm install --frozen-lockfile --offline

# This build stage is used to build the codebase used in production environment of talawa api.
FROM base AS production_code
COPY --chown=talawa:talawa ./pnpm-lock.yaml ./pnpm-lock.yaml
RUN corepack prepare [email protected] --activate && pnpm fetch --frozen-lockfile
RUN pnpm fetch --frozen-lockfile
COPY --chown=talawa:talawa ./ ./
RUN corepack prepare [email protected] --activate && pnpm install --frozen-lockfile --offline && pnpm build_production
RUN pnpm install --frozen-lockfile --offline && pnpm build_production

# This build stage is used to download and install the dependencies used in production environment of talawa api.
FROM base AS production_dependencies
COPY --chown=talawa:talawa ./pnpm-lock.yaml ./pnpm-lock.yaml
RUN corepack prepare [email protected] --activate && pnpm fetch --frozen-lockfile --prod
RUN pnpm fetch --frozen-lockfile --prod
COPY --chown=talawa:talawa ./package.json ./package.json
RUN corepack prepare [email protected] --activate && pnpm install --frozen-lockfile --offline --prod
RUN pnpm install --frozen-lockfile --offline --prod

# This build stage is used to create the container image for production environment of talawa api.
FROM base AS production
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"license": "GNU General Public License v3.0",
"main": "./dist/index.js",
"name": "talawa-api",
"packageManager": "pnpm@10.0.0",
"packageManager": "pnpm@9.15.4",
"repository": {
"type": "git",
"url": "https://github.com/PalisadoesFoundation/talawa-api"
Expand Down
Loading