-
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.
feat: migration de l'outil de contrib (#766)
- Loading branch information
Showing
352 changed files
with
23,565 additions
and
2,840 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
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
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 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: contributions | ||
data: | ||
CDTN_API_URL: "https://cdtn-api.fabrique.social.gouv.fr" | ||
API_URI: "http://app-www" | ||
HASURA_GRAPHQL_ENDPOINT: "http://hasura/v1/graphql" | ||
NODE_ENV: "production" |
17 changes: 17 additions & 0 deletions
17
.kube-workflow/dev/templates/contributions.sealed-secret.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,17 @@ | ||
--- | ||
apiVersion: "bitnami.com/v1alpha1" | ||
kind: "SealedSecret" | ||
metadata: | ||
annotations: &a1 | ||
sealedsecrets.bitnami.com/cluster-wide: "true" | ||
name: contributions | ||
namespace: null | ||
spec: | ||
encryptedData: | ||
HASURA_GRAPHQL_ADMIN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eE02tB+I9/VaEMrBL2WCJKhGHTjlDxexl4V/fswFYgXc/T4+hmPVB76xWVi6yFfggD/tLcAvgw3Ivdmbk/1c4CayKjU0+B+57EVrRqCGbJieBfbv6L3EWjU0uQj/uJEaZxIF4st3/r+iSGnrtPveBqnUgkJeqOmhf4sWJwE3xsPJM2kNYDPelWpYdxpoPaq3PNcLs7WpxMtRvwvvz2LMsWhEuUyHpe5yLOvi5swhcGqX1ALxGxfxzV+O229WfuTmV/kGUmcHhdf/VXdJRa+PYS83YK39wC1ZsoXJvPjAvEMgoTaRE8NHPWVD2ookNwdiRQIoLrSrGMP6F+Team2KtCic9ONYnM2wwUj2JCQRkFX2LZXwm9g9uR/Leuyd/IL5+tczwfF+PHfs6TQv+uKVz2qoZQZk4myQ/0JwHluOSXHTwEWkvuwGYO8QMTDOTTdp4Dor3kN7hQZyvWf41V/EHmOoLeFsdpQkWexo1FWHRZYtgG7ZVrgs07bY65gY6c1tZOKFaWhacTuneiLosz79vxn5omsFpjOOiWdSQOPZU8GkGxqJVq16H3VJg== | ||
template: | ||
metadata: | ||
annotations: *a1 | ||
name: contributions | ||
type: "Opaque" |
9 changes: 9 additions & 0 deletions
9
.kube-workflow/preprod/templates/contributions.configmap.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 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: contributions | ||
data: | ||
CDTN_API_URL: "https://cdtn-api.fabrique.social.gouv.fr" | ||
API_URI: "http://app-www" | ||
HASURA_GRAPHQL_ENDPOINT: "http://hasura/v1/graphql" | ||
NODE_ENV: "production" |
17 changes: 17 additions & 0 deletions
17
.kube-workflow/preprod/templates/contributions.sealed-secret.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,17 @@ | ||
--- | ||
apiVersion: "bitnami.com/v1alpha1" | ||
kind: "SealedSecret" | ||
metadata: | ||
annotations: &a1 | ||
sealedsecrets.bitnami.com/cluster-wide: "true" | ||
name: contributions | ||
namespace: null | ||
spec: | ||
encryptedData: | ||
HASURA_GRAPHQL_ADMIN_SECRET: AgC4DoTx/Burraa4LQnxWJ8pa4gK7mSHWd4fFFUHWeVrTmcoxLRyVVqH8ajgXFBZ1uksTujs8LM0eDtxeO/d6e88y7lF8epCutVm/9Lr39E8eMA4zwMU6QNrCX4j34YRonf4vbOnlUfm88XKek7DTOsUsbTp5BbO/IrESzabBJ9ntLBAdCVK+j6eGZyCC44VcfszHoiQINwi0Iax66KuA4oUvpQuTdTbB20wr9vzZarMatDDQRYtjugtYFzQQAv45+BZscb1Q+cMz+MXGOeJTDpFrhhV0OeDp5llEDhmx3nhyeRGyeWZdvONrDl4lDvftO6b8CTV1jBaoCX1r8pKcdp69WbkX2V+62lqamr5bmgJiuBWeOTHT1qQrv9uuInhrBBrkcHrXXMKlTY+p9auY/IQLw9CyBn41sK+RDteQfoZFRHSo2UOipbfgB5j9mCVnyJLDYLfyH4TEdGM6lkCATnKHr7Jz16IeR+GwmLfHrHkv3TW6zPijBBZRVcC5Z6LQNVv/6BzrKlzOkgZCKsX5pgaQWQBDSJSe8QGkx3Ccik6XpC/jgdHPEuP8zqDhE4VzWM6FrsxLAvso5WWNgdmS3i01RFa+pnFK7wLp7oLtDjKo7GyG2mXGt2B2+uvUffAmrE4jTCIbjUQtgrHHDBpq0hhxrG0njbh3SL29fNz1FeaXOFdubRfs0Zg2aNXtwDFHDrM8jCt/Yj4mY21uKup82mQZG6FCENCx+Hl7GGtuhs= | ||
HASURA_GRAPHQL_JWT_SECRET: AgDSW4ceV9HFoxBNqg/hGa6uunl76cjtKBRSYf5LEPKzNHtXixd73LoFGa2y6/cQ/yGevNU6k7w62pkbWnz5rNAznsBE8QtBt1eRKQqjyJJ21m4sWI/MK6UI3gUS/Ad+LeCMxSoKG3XEzFSAwSndSXsgmwAP4KPpBF83DvdpVVpZtAjvPbNYNE6Ocjhtmt/TLqWjsV4Z+hkS8CKGk+PsYDEuR74Mj5TJys0MALJA9TB2dTIqMHOVZofD8T9hKH42yJWCDruH+gNNPKcleG/R0Pt7LJSamZtsqtXdxeE02tB+I9/VaEMrBL2WCJKhGHTjlDxexl4V/fswFYgXc/T4+hmPVB76xWVi6yFfggD/tLcAvgw3Ivdmbk/1c4CayKjU0+B+57EVrRqCGbJieBfbv6L3EWjU0uQj/uJEaZxIF4st3/r+iSGnrtPveBqnUgkJeqOmhf4sWJwE3xsPJM2kNYDPelWpYdxpoPaq3PNcLs7WpxMtRvwvvz2LMsWhEuUyHpe5yLOvi5swhcGqX1ALxGxfxzV+O229WfuTmV/kGUmcHhdf/VXdJRa+PYS83YK39wC1ZsoXJvPjAvEMgoTaRE8NHPWVD2ookNwdiRQIoLrSrGMP6F+Team2KtCic9ONYnM2wwUj2JCQRkFX2LZXwm9g9uR/Leuyd/IL5+tczwfF+PHfs6TQv+uKVz2qoZQZk4myQ/0JwHluOSXHTwEWkvuwGYO8QMTDOTTdp4Dor3kN7hQZyvWf41V/EHmOoLeFsdpQkWexo1FWHRZYtgG7ZVrgs07bY65gY6c1tZOKFaWhacTuneiLosz79vxn5omsFpjOOiWdSQOPZU8GkGxqJVq16H3VJg== | ||
template: | ||
metadata: | ||
annotations: *a1 | ||
name: contributions | ||
type: "Opaque" |
10 changes: 10 additions & 0 deletions
10
.kube-workflow/prod/templates/contributions.configmap.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,10 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: contributions | ||
data: | ||
CDTN_API_URL: "https://cdtn-api.fabrique.social.gouv.fr" | ||
API_URI: "http://app-www" | ||
HASURA_GRAPHQL_ENDPOINT: "http://hasura/v1/graphql" | ||
NODE_ENV: "production" | ||
|
14 changes: 14 additions & 0 deletions
14
.kube-workflow/prod/templates/contributions.sealed-secret.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: "bitnami.com/v1alpha1" | ||
kind: "SealedSecret" | ||
metadata: | ||
name: contributions | ||
namespace: cdtn-admin | ||
spec: | ||
encryptedData: | ||
HASURA_GRAPHQL_ADMIN_SECRET: AgA/oEQJToFMrm/N+uHwfhDnRu7XDNm+Bkioqq1a8cGNuwhNC51dl3rxHw0l4l4ggpcRsHR/gt4h1V/kHjsKtfKSl1opnvAqlHeEiFHMqs3Dv27o+rLR8xYxrbW//3ZXKXeQufIKkrg8eD4ZGzc9KvR/HdOQtJ4oG3hWc+Lq/47C55wfBWjvGRnrlGf4IcnmZ6JEK0mF+AukD6Jd+BFAyeVhzZ52/1W1w55rWNrOf3OkjUEJAwDVakqnkAjK42gGAZh25XvkvV23PUeopL5oX4GqmdQctMU12kX+QwPy+B0biIE9LKCeohAZlDfxY4KrUsXRnWD7W8M9YpmTqdDOpHdJov/0hd8mjfsrxA3HOfVPxVMvieXbICEiUtkcOPxuuuidU89Iz+WFO2NM20IOeCVQWCba1OT4pM5pX4IKUB01Hj7Or57nhZa7DWpVL4HWIFdeRHlZFXpSRj3d4gUo4LlumGgFwtBhr+rU9/KGsdMtaWXuMIZXx7g6UcaaMxi69Qc0tZastY922NA+KQW3/r9I1+NJm+8lcNBndl5YlvYos5eodPnfgAo77+5RV5R2idNf7nDJZ9/hZCp28k8Dh97cMhAclT/Xc7gVloiFZuCuzlmlKyBS3D3mSdAml6P7q55LxP0oPq/U0UAKiq27+lAJt7LCYT8qrqVwUX50O8ODeC6lAwxdPqtn+rncEkt1gkEF+pcv0DGPuZN0YykxI5USza7x9cCc2ol4YxyY0IU= | ||
HASURA_GRAPHQL_JWT_SECRET: AgBk8DBUbfxqEW+0c9Omk5p+fL8ZCpL93AvZ0dKENqZHqPgE5Eou3eqce0Yp1eXhx3zpfhyXUWug/Io5FiIotje9VHoVzCzU40o/AK8E6pJ5lX5frcyH4VSn1iABoBp2zU3351DQNAs9KX7JhPaRqgkGgddjSAWNV+m+RQyBurJncNvP7CpE2e3379VEJJqhBxgYKiN32vtjmEPZHEIl23hkuPH7GyOdP8OO+ZBMG8wkHUuMsl4GHKgJicHydPeP3GVdfvD0GQR5x+zmrEMyGob/2oedsCCeKfURxH+QP/F7c4L8EYDerbHxH7FZdFBqG5ogmc35OUkyLWGTZl/8gJfslt7OyWzH1J1vo+C7n1kthxRh1lCWAyBz0Gv6kkm3uroyXJFfmWbR19zQNP5TsrjqZUD28hmWyE0wxI5/L+h1cdsqCkm5cupe0u1lXFmArMU90LAzrRR6M5jZJpkwOGOIrAwJ6Ohsgue7DIEB/jPiwdCMXBs9PP2iLyqfR6suUgngfYoHMNtiBHX+b05OxhoJDunEFWo9tYfweby/DeGH6KV2/T55rmBNh4eGgHNmAiG4Mx4IVXkGqr22CkHHz36SHliHeF5jXmIfo6UBrEEQBJ4OKBuJSINuDqFQNS8ENME2MgfEd8xttWJxs3An4jYihhGdBnA5IYcxiCzD8No2VIop89CKrCCtfsKnmBKvfbbVfk5Z3k+0DBmAO6NXqMQZ18mgVod6pjueB3YfLCoDH1L3hs31OH3lupzic9OY4MkKGkYn6Yppt/oErAp/Cc02bPm1QeUva2OUekZ9/Ar9EC6vvasohmBWbVEMLXV1xQPOxDHjTpGe6h26Ok3PJohQCxnfLw== | ||
template: | ||
metadata: | ||
name: contributions | ||
namespace: cdtn-admin | ||
type: "Opaque" |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG NODE_VERSION=14.18.0-slim | ||
ARG NODE_VERSION=14.18.2-slim | ||
|
||
# dist | ||
FROM node:$NODE_VERSION AS 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["next/babel"], | ||
"plugins": [["@emotion"]] | ||
} |
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,3 @@ | ||
last 2 Chrome versions | ||
last 2 Edge versions | ||
last 2 Firefox versions |
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,11 @@ | ||
.next/ | ||
__tests__/ | ||
node_modules/ | ||
tests/ | ||
|
||
*.d.ts | ||
*.md | ||
|
||
jest.config.js | ||
LICENSE | ||
|
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,6 @@ | ||
.env.production | ||
.eslintcache | ||
.next | ||
*.DS_Store | ||
data/* | ||
node_modules |
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,44 @@ | ||
ARG NODE_VERSION=14.18.2 | ||
|
||
FROM node:$NODE_VERSION AS dist | ||
|
||
WORKDIR /app | ||
|
||
ARG CDTN_API_URL | ||
ENV CDTN_API_URL=$CDTN_API_URL | ||
|
||
COPY shared/graphql-client/package.json /shared/graphql-client/package.json | ||
COPY targets/contributions/package.json /targets/contributions/package.json | ||
COPY package.json /package.json | ||
COPY yarn.lock /yarn.lock | ||
|
||
COPY . / | ||
|
||
RUN yarn --frozen-lockfile | ||
|
||
RUN yarn workspace @shared/graphql-client build | ||
|
||
RUN yarn workspace @socialgouv/contibutions build | ||
|
||
# app | ||
FROM node:$NODE_VERSION | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=dist shared/graphql-client/build /app/shared/graphql-client/build | ||
COPY --from=dist shared/graphql-client/package.json /app/shared/graphql-client/package.json | ||
COPY --from=dist targets/contributions/package.json /app/targets/contributions/package.json | ||
COPY --from=dist targets/contributions/next.config.js /app/targets/contributions/next.config.js | ||
COPY --from=dist targets/contributions/public /app/targets/contributions/public | ||
COPY --from=dist targets/contributions/server /app/targets/contributions/server | ||
COPY --from=dist targets/contributions/.next /app/targets/contributions/.next | ||
COPY --from=dist targets/contributions/node_modules /app/targets/contributions/node_modules | ||
COPY --from=dist package.json /app/package.json | ||
COPY --from=dist node_modules /app/node_modules | ||
|
||
USER 1000 | ||
|
||
ENV NODE_ENV=production | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
||
CMD ["yarn", "--cwd", "targets/contributions", "start"] |
Oops, something went wrong.