generated from mrtousif/reddit-clone
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: prisma npmrc * chore: renamed backend to main_server * fix: dockerfile * chore: update lock file * chore: updated realm name * chore: updated lock file
- Loading branch information
Showing
83 changed files
with
2,627 additions
and
2,591 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
auto-install-peers=true | ||
strict-peer-dependencies=false | ||
strict-peer-dependencies=false | ||
public-hoist-pattern[]=*prisma* |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM node:16-alpine AS baseImage | ||
ARG PNPM_VERSION=7.16.1 | ||
ARG SERVICE_PATH | ||
ARG PACKAGE_NAME | ||
|
||
# Install package manager | ||
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \ | ||
npm i --global --no-update-notifier --no-fund pnpm@${PNPM_VERSION} | ||
|
||
# Use the node user from the image (instead of the root user) | ||
USER node | ||
|
||
# Get all dependencies and install | ||
FROM baseImage AS dependencies | ||
|
||
WORKDIR /usr/app | ||
|
||
COPY --chown=node:node pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./ | ||
COPY --chown=node:node ${SERVICE_PATH}/package.json ./${SERVICE_PATH}/package.json | ||
|
||
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \ | ||
pnpm install --frozen-lockfile --filter ${PACKAGE_NAME}\ | ||
| grep -v "cross-device link not permitted\|Falling back to copying packages from store" | ||
|
||
# Build application using all dependencies, copy necessary files | ||
FROM dependencies AS build | ||
ARG NODE_ENV=production | ||
ENV NODE_ENV=${NODE_ENV} | ||
|
||
WORKDIR /usr/app/${SERVICE_PATH} | ||
|
||
COPY --chown=node:node ${SERVICE_PATH} ./ | ||
|
||
RUN pnpm build | ||
RUN rm -rf node_modules src \ | ||
&& pnpm -r exec -- rm -rf node_modules | ||
|
||
# Use base image for correct context, get built files from build stage | ||
# Install only production dependencies | ||
FROM baseImage AS deploy | ||
|
||
WORKDIR /usr/app | ||
|
||
ENV NODE_ENV production | ||
|
||
COPY --chown=node:node --from=build /usr/app . | ||
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \ | ||
pnpm install --frozen-lockfile --filter ${PACKAGE_NAME} --prod \ | ||
| grep -v "cross-device link not permitted\|Falling back to copying packages from store" | ||
|
||
ENV EXEC_PATH=${SERVICE_PATH}/dist/main.js | ||
|
||
CMD node ${EXEC_PATH} |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ Keycloak | |
|
||
```sh | ||
curl --request POST \ | ||
--url http://localhost:8180/realms/myrealm/protocol/openid-connect/token \ | ||
--url http://localhost:8180/realms/development_realm/protocol/openid-connect/token \ | ||
--header 'Content-Type: application/x-www-form-urlencoded' \ | ||
--data [email protected] \ | ||
--data password=password123 \ | ||
|
@@ -22,9 +22,9 @@ curl -XPOST 127.0.0.1:9080/apisix/admin/routes -H "X-Api-Key: edd1c9f034335f136 | |
"client_id": "hasura", | ||
"client_secret": "sGDpddl2JcwvrUk7IERmqDA9QTyNqwyN", | ||
"disable": false, | ||
"discovery": "https://8180-mrtousif-youtubeclone-6p60rhw8gtr.ws-us67.gitpod.io/realms/myrealm/.well-known/openid-configuration", | ||
"discovery": "https://8180-mrtousif-youtubeclone-6p60rhw8gtr.ws-us67.gitpod.io/realms/development_realm/.well-known/openid-configuration", | ||
"introspection_endpoint_auth_method": "client_secret_post", | ||
"realm": "myrealm", | ||
"realm": "development_realm", | ||
"redirect_uri": "https://9080-mrtousif-youtubeclone-6p60rhw8gtr.ws-us67.gitpod.io/", | ||
"scope": "openid profile" | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
apps/backend/test/app.e2e-spec.ts → apps/main_server/test/app.e2e-spec.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.