This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SKFP-15: Replace EGO by Keycloak (#90)
* SKFP-15: Add keycloak and turn projet to typescript and add eslint and prettier and update dependancies * SKFP-15: Rename client id * SKFP-15: Update README * SKFP-15: Use sub instead of user_id * SKFP-82: Try to deploy keycloak branch in QA * SKFP-82: Add configs to .env.example * SKFP-82: Use real realm in QA * Remove branch deployment before merging to master Co-authored-by: Céline Pelletier <celinepelletier@CRHSJ106784.local> Co-authored-by: Céline Pelletier <celinepelletier@ip-192-168-2-32.ec2.internal>
- Loading branch information
1 parent
e2f7db4
commit 653171f
Showing
49 changed files
with
2,775 additions
and
13,571 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,6 +1,8 @@ | ||
NODE_ENV= | ||
|
||
EGO_API= | ||
KEYCLOAK_URL= | ||
KEYCLOAK_REALM= | ||
KEYCLOAK_CLIENT= | ||
|
||
MONGO_HOST= | ||
MONGO_DB= | ||
|
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,2 @@ | ||
node_modules | ||
dist |
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,3 +1,35 @@ | ||
{ | ||
"extends": ["airbnb", "plugin:prettier/recommended"] | ||
} | ||
"env": { | ||
"commonjs": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"arrow-body-style": ["error", "as-needed"], | ||
"complexity": ["warn", 16], | ||
"template-curly-spacing": "off", | ||
"indent": "off", | ||
"default-case": 0, | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 160, | ||
"ignoreComments": true | ||
} | ||
], | ||
"no-console": ["error", { "allow": ["warn", "error"] }], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], | ||
"prefer-spread": "error", | ||
"prettier/prettier": ["error"] | ||
} | ||
} |
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,4 +4,5 @@ migrations/dist | |
.vscode | ||
.yarnclean | ||
.idea | ||
yarn-error.log | ||
yarn-error.log | ||
dist/ |
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,3 +1,7 @@ | ||
{ | ||
"singleQuote": true | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"tabWidth": 4 | ||
} |
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,21 +1,25 @@ | ||
FROM mhart/alpine-node:latest | ||
FROM mhart/alpine-node:latest AS image-build | ||
|
||
RUN mkdir -p /opt/app | ||
|
||
WORKDIR /opt/app | ||
|
||
RUN apk add --update --no-cache git | ||
|
||
# copy just the package.json/yarn.lock and install dependencies for caching | ||
COPY . . | ||
|
||
RUN yarn install && yarn clean && yarn build | ||
|
||
FROM mhart/alpine-node:latest AS image-run | ||
WORKDIR /opt/app | ||
COPY --from=image-build ./opt/app/dist ./dist | ||
COPY package.json yarn.lock ./ | ||
|
||
RUN NODE_ENV=production yarn --ignore-optional && \ | ||
RUN NODE_ENV=production yarn install --production --ignore-optional && \ | ||
yarn autoclean --init && \ | ||
yarn autoclean --force && \ | ||
yarn cache clean | ||
|
||
COPY . . | ||
|
||
EXPOSE 3232 | ||
|
||
CMD yarn start |
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.