-
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.
IMN-539 Add scaffold for authorization-process (#527)
- Loading branch information
1 parent
149fbe4
commit 12b5461
Showing
27 changed files
with
2,079 additions
and
1 deletion.
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
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
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,20 @@ | ||
HOST=0.0.0.0 | ||
PORT=3000 | ||
LOG_LEVEL=info | ||
|
||
EVENTSTORE_DB_HOST=localhost | ||
EVENTSTORE_DB_NAME=root | ||
EVENTSTORE_DB_USERNAME=root | ||
EVENTSTORE_DB_PASSWORD=root | ||
EVENTSTORE_DB_PORT=6001 | ||
EVENTSTORE_DB_SCHEMA=authorization | ||
EVENTSTORE_DB_USE_SSL=false | ||
|
||
READMODEL_DB_HOST=localhost | ||
READMODEL_DB_NAME=readmodel | ||
READMODEL_DB_USERNAME=root | ||
READMODEL_DB_PASSWORD=example | ||
READMODEL_DB_PORT=27017 | ||
|
||
WELL_KNOWN_URLS="https://dev.interop.pagopa.it/.well-known/jwks.json" | ||
ACCEPTED_AUDIENCES="dev.interop.pagopa.it/ui,refactor.dev.interop.pagopa.it/ui" |
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,41 @@ | ||
FROM node:18.20.2-slim@sha256:2697eb70c760c3720ad9811871d5ab19c4ad2f2e0a3735785e531927ab99bd39 as build | ||
|
||
RUN corepack enable | ||
|
||
WORKDIR /app | ||
COPY package.json /app/ | ||
COPY pnpm-lock.yaml /app/ | ||
COPY pnpm-workspace.yaml /app/ | ||
|
||
COPY ./packages/authorization-process/package.json /app/packages/authorization-process/package.json | ||
COPY ./packages/commons/package.json /app/packages/commons/package.json | ||
COPY ./packages/models/package.json /app/packages/models/package.json | ||
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
|
||
COPY tsconfig.json /app/ | ||
COPY turbo.json /app/ | ||
COPY ./packages/authorization-process /app/packages/authorization-process | ||
COPY ./packages/commons /app/packages/commons | ||
COPY ./packages/models /app/packages/models | ||
|
||
RUN pnpm build && \ | ||
rm -rf /app/node_modules/.modules.yaml && \ | ||
rm -rf /app/node_modules/.cache && \ | ||
mkdir /out && \ | ||
cp -a --parents -t /out \ | ||
node_modules packages/authorization-process/node_modules \ | ||
package*.json packages/authorization-process/package*.json \ | ||
packages/commons/ \ | ||
packages/models/ \ | ||
packages/authorization-process/dist && \ | ||
find /out -exec touch -h --date=@0 {} \; | ||
|
||
FROM node:18.20.2-slim@sha256:2697eb70c760c3720ad9811871d5ab19c4ad2f2e0a3735785e531927ab99bd39 as final | ||
|
||
COPY --from=build /out /app | ||
|
||
WORKDIR /app/packages/authorization-process | ||
EXPOSE 3000 | ||
|
||
CMD [ "node", "." ] |
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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: interop-be-authorization-process-refactor | ||
namespace: dev-refactor | ||
data: | ||
EVENTSTORE_DB_USE_SSL: "true" | ||
EVENTSTORE_DB_SCHEMA: "dev-refactor_authz" |
117 changes: 117 additions & 0 deletions
117
packages/authorization-process/kubernetes/dev/deployment.yaml
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,117 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: interop-be-authorization-process-refactor | ||
namespace: dev-refactor | ||
labels: | ||
app: interop-be-authorization-process-refactor | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: interop-be-authorization-process-refactor | ||
template: | ||
metadata: | ||
labels: | ||
app: interop-be-authorization-process-refactor | ||
spec: | ||
serviceAccountName: interop-be-authorization-process-refactor | ||
containers: | ||
- name: interop-be-authorization-process-refactor | ||
image: ghcr.io/pagopa/authorization-process@$IMAGE_DIGEST | ||
imagePullPolicy: Always | ||
ports: | ||
- name: http | ||
containerPort: 3000 | ||
protocol: TCP | ||
resources: | ||
requests: | ||
cpu: 1.0 | ||
memory: 2Gi | ||
limits: | ||
cpu: 1.0 | ||
memory: 2Gi | ||
livenessProbe: | ||
httpGet: | ||
path: /status | ||
port: http | ||
initialDelaySeconds: 15 | ||
periodSeconds: 5 | ||
readinessProbe: | ||
httpGet: | ||
path: /status | ||
port: http | ||
initialDelaySeconds: 15 | ||
periodSeconds: 5 | ||
env: | ||
- name: PORT | ||
value: "3000" | ||
- name: HOST | ||
value: "0.0.0.0" | ||
- name: LOG_LEVEL | ||
value: info | ||
- name: EVENTSTORE_DB_HOST | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: EVENTSTORE_DB_HOST | ||
- name: EVENTSTORE_DB_NAME | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: EVENTSTORE_DB_NAME | ||
- name: EVENTSTORE_DB_PORT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: EVENTSTORE_DB_PORT | ||
- name: EVENTSTORE_DB_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: persistence-management | ||
key: REFACTOR_USERNAME | ||
- name: EVENTSTORE_DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: persistence-management | ||
key: REFACTOR_USER_PASSWORD | ||
- name: EVENTSTORE_DB_SCHEMA | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-authorization-process-refactor | ||
key: EVENTSTORE_DB_SCHEMA | ||
- name: EVENTSTORE_DB_USE_SSL | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-authorization-process-refactor | ||
key: EVENTSTORE_DB_USE_SSL | ||
- name: READMODEL_DB_HOST | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: READMODEL_DB_HOST | ||
- name: READMODEL_DB_NAME | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: READMODEL_DB_NAME | ||
- name: READMODEL_DB_PORT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: READMODEL_DB_PORT | ||
- name: WELL_KNOWN_URLS | ||
valueFrom: | ||
configMapKeyRef: | ||
name: interop-be-common-refactor | ||
key: WELL_KNOWN_URLS | ||
- name: READMODEL_DB_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: read-model | ||
key: REFACTOR_USERNAME | ||
- name: READMODEL_DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: read-model | ||
key: REFACTOR_USER_PASSWORD |
14 changes: 14 additions & 0 deletions
14
packages/authorization-process/kubernetes/dev/service.yaml
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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: interop-be-authorization-process-refactor | ||
namespace: dev-refactor | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 3000 | ||
name: http | ||
targetPort: http | ||
protocol: TCP | ||
selector: | ||
app: interop-be-authorization-process-refactor |
9 changes: 9 additions & 0 deletions
9
packages/authorization-process/kubernetes/dev/serviceAccount.yaml
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,9 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: interop-be-authorization-process-refactor | ||
namespace: dev-refactor | ||
labels: | ||
app.kubernetes.io/name: interop-be-authorization-process-refactor | ||
annotations: | ||
eks.amazonaws.com/role-arn: arn:aws:iam::505630707203:role/interop-be-authorization-process-refactor-dev |
Oops, something went wrong.