Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Oct 9, 2024
1 parent a2fdb66 commit 33b5394
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
7 changes: 5 additions & 2 deletions .kontinuous/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
projectName: enfants-du-spectacle
dependencies:
fabrique:
extends:
- name: ovh
dependencies:
contrib:
patches:
updateManifestsWithPreprodResources:
enabled: false
4 changes: 4 additions & 0 deletions .kontinuous/env/dev/templates/app.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ data:
NODE_ENV: "production"
EMAIL_FROM: "Enfants du Spectacle [DEV] <enfantsduspectacle@diffusion.fabrique.social.gouv.fr>"
DEMARCHE_NUMBER: "55315"
API_URL_INSTRUCTEUR: "https://{{ .Values.global.host }}/api/sync"
API_URL_SDP: "https://formulaire-{{ .Values.global.host }}/api/sync"
URL_SDP: "https://formulaire-{{ .Values.global.host }}"
URL_INSTRUCTEUR: "https://{{ .Values.global.host }}"
1 change: 1 addition & 0 deletions .kontinuous/env/dev/templates/app.sealed-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
encryptedData:
EMAIL_SERVER_PASSWORD: AgCz3/884rjXiJXXZZ47Sq44sjuJboBUXzktfq43oxwppS0xMMwwTk9UmdT19DQEGu+8GzmhjFPuU+fBAkJ90U86OSqWIHk0YCa1A72Ka6aLnqgR833YkHwfXkxYSl67SyIH6YQF62hRJ7yxDf39cFv2Jis4fPb86lbkqDvsFPgViGvkZ+Diplcp5X6iqcFBRPxu5box7G6TsK4GSB5REnMleE6PUuMM1G5t/gPeaj+jGRfmrC9ze4ozexOV6C8uyZOn/sUCFKsR7RCh8dSmGkjwwNzJhSOQIPeNvEWyZziPmbtLUsQmOubAb676JD8fP8gyRPRUKVpyTLxJxYcTlCMVCKfAN7WV6V/mbbXNnBaXJjKJeM0XUUllQ268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9EHFC0g+LCaw/1ud/qpsA/KY9A5D9XoJJ+nQS/Mqs3SoppUbhPwZS+kKuhuRVt7LGU3wqJuD2C4BR/uaZLFdawBN6BbJ2HEulfFKMzbgKGAcDrlT9+HTkOrT2V1hD8fMrVflZw=
NEXTAUTH_SECRET: AgAytCq4l3sWviAdYgi2vQRegThmf2O2IUfVFvU6qXC79TM8DH/cU3zcANTGWIiWgjBLSfbC8ufIYGPLCtVRtKff+lHpJOLoSPV93gVzuGvOZZFCeXfnq3BldxW2AwmQGxfJ2DVhTHERImE5sLuOqgg/DNb8xjaAyQHShZRkZtkW50fDDcejGE7OLUiQ0exSfvSzQ4mnr173WhnUWrGS1u9uN4Y9ebaN5Kn0eVN6JyYx1GtkSssoOVgCrMxbpu4bkL1GDsDlInMmDLL+eu3Jjyi1QLXZ+vnjVhm1dE6yrHJ7FATEpyYgurLiVQm39Hyn5FfVbmguFUHNArxertuOs+K2tbZjnhrnJIVCuV5TuZ9GarrJt8MnRCnL6KfzEABBbLzDzNyMGs/09g5LQ3Kh0YX8R5hI7b5biUsn6lnKr10hOJpwVtoSlwb9BTBklG+Vn2We9gRNJaoYLTKJ1QxrI6q0d8g7ScuNMXz/57u/4D6ec7xKUFVxly22M8Pm5cByz4ndRx7onp4y9RsKYuxFmUynCa5wEf7mXCkizSIkUx2BNxmx8F9SJ9oQAny9lc5cIJ6CN0D4Hmnhr4b76M3rItwWzwP4eU3Sy5krbWt4V0bacTr+UMcRnydkfv5vKaEO46QezRAwI6Bne7gCDsIG3uf03WepwSE3UKSuquprXD9uBRT7v3WSz6R9BCdtoXfDA4gZzhfp8djwwiK14mtcjjtLXEDA81+YwyMxepAZ4HcdYszQ0Y+NqfHvBNxnIw==
Expand Down
12 changes: 12 additions & 0 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,25 @@ form:
- mountPath: /mnt/docs
name: docs-form

pg:
cnpg-cluster:
monitoring:
~tpl~enablePodMonitor: "true"

pg-form:
cnpg-cluster:
monitoring:
~tpl~enablePodMonitor: "true"

jobs:
runs:
build-app:
with:
buildArgs:
NEXT_PUBLIC_SENTRY_ENVIRONMENT: review
START_SCRIPT: start-review
NEXT_PUBLIC_API_URL_SDP:
https://formulaire-{{ .Values.global.host }}/api/sync
build-form:
with:
buildArgs:
Expand Down
20 changes: 8 additions & 12 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ app:
~chart: app
~needs: [build-app, pg]
imagePackage: app
annotations:
"oblik.socialgouv.io/min-request-memory": 1Gi
"oblik.socialgouv.io/min-request-cpu": 300m
resources:
requests:
cpu: 0.2
memory: 256Mi
limits:
cpu: 1
memory: 4Gi
memory: 1Gi
cpu: 300m
env:
- name: APP_BASE_URL
value: "https://{{ $.Values.global.host }}"
Expand Down Expand Up @@ -40,14 +40,10 @@ form:
~chart: app
~needs: [build-form, pg-form]
imagePackage: form
annotations:
"oblik.socialgouv.io/min-request-memory": 1Gi
"oblik.socialgouv.io/min-request-cpu": 300m
host: "formulaire-{{ $.Values.global.host }}"
resources:
requests:
cpu: 0.2
memory: 256Mi
limits:
cpu: 1
memory: 4Gi
env:
- name: APP_BASE_URL
value: "https://formulaire-{{ $.Values.global.host }}"
Expand Down
3 changes: 2 additions & 1 deletion formulaire/src/fetching/sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { DossierData, EnfantData } from "./dossiers";

const sendDossier = async (dossier: DossierData, demandeur: DemandeurData, societeProduction: SocieteProduction, enfants: EnfantData[]) => {
const url = "/api/sync/out/dossiers";
console.log("SENDING DOSSIER", JSON.stringify({dossier: dossier, demandeur: demandeur, societeProduction: societeProduction, enfants: enfants}))
const fetching = await fetch(url, {
body: JSON.stringify({dossier: dossier, demandeur: demandeur, societeProduction: societeProduction, enfants: enfants}),
method: "POST",
Expand All @@ -18,4 +19,4 @@ const sendDossier = async (dossier: DossierData, demandeur: DemandeurData, socie

export {
sendDossier
}
}

0 comments on commit 33b5394

Please sign in to comment.