-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) This reverts commit 639ccca.
- Loading branch information
1 parent
639ccca
commit 407de42
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters