Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
SKFP-15: Replace EGO by Keycloak (#90)
Browse files Browse the repository at this point in the history
* 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
3 people authored Nov 3, 2021
1 parent e2f7db4 commit 653171f
Show file tree
Hide file tree
Showing 49 changed files with 2,775 additions and 13,571 deletions.
4 changes: 3 additions & 1 deletion .env.schema
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=
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
36 changes: 34 additions & 2 deletions .eslintrc
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"]
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ migrations/dist
.vscode
.yarnclean
.idea
yarn-error.log
yarn-error.log
dist/
6 changes: 5 additions & 1 deletion .prettierrc
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
}
14 changes: 9 additions & 5 deletions Dockerfile
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ a kids-first instantiation of the persona microservice: https://github.com/kids-
- Create a local `.env` file based on the provided schema in `.env.schema`

```
yarn --ignore-optional && \
yarn --ignore-optional && \
yarn build && \
yarn autoclean --init && \
yarn autoclean --force && \
yarn cache clean && yarn start
Expand Down
11 changes: 0 additions & 11 deletions index.js

This file was deleted.

Loading

0 comments on commit 653171f

Please sign in to comment.