Skip to content

Commit

Permalink
chore: update vault
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebigard committed Oct 30, 2024
1 parent 0bffec9 commit 45d6567
Show file tree
Hide file tree
Showing 6 changed files with 678 additions and 420 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
options:
- production
- recette
- next
app_version:
description: app version
type: string
Expand Down
8 changes: 8 additions & 0 deletions .infra/env.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ dns_name={{domain_name}}.inserjeunes.beta.gouv.fr
host_name={{product_name}}-production
env_type=production


[next]
141.94.126.187
[next:vars]
dns_name={{domain_name}}-next.inserjeunes.beta.gouv.fr
host_name={{product_name}}-next
env_type=next

[recette]
91.134.7.100
[recette:vars]
Expand Down
1,062 changes: 646 additions & 416 deletions .infra/vault/vault.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fileignoreconfig:
- filename: .infra/files/configs/mongodb/seed.gpg
checksum: b1fa159bb2036a835b4138843b48043eca4ea374bcbb710ba4593bd39b1dfec1
- filename: .infra/vault/vault.yml
checksum: 47d3de722cc6653fb7052b1c069f354b1a53707f255f39bae8a0beb58f07c147
checksum: 6528aa14dab5de471eddd0215565e62b8a5f70dbf6131a5c0fa09f8051fa05f5
- filename: README.md
checksum: 00ac991f0b2746c5a5ffa14e2b3c5427b739c0d952aa3730efe1f234ac1fc3ca
- filename: server/tests/test_origin/controllers/campagnes.controller.test.js_old
Expand Down Expand Up @@ -36,7 +36,7 @@ fileignoreconfig:
- filename: server/tests/test_origin/services/users.service.test.js_old
checksum: aa5435b4faf485b49d3e9362d7550432cc4a431b863e8248f5b95b18b3d3e931
- filename: ui/src/config.public.ts
checksum: b13b0a1f3d9590d335062a88e76609c40ba790129e481f7e5c25fbdab6840617
checksum: b7c748519d06791c08cd35fd84a38d2ff414a7600c6f51d4c38954187524d0d8
- filename: ui/src/utils/generateUri.ts
checksum: 505911d86f3b3f4a9337504a691132dba83dec4a950f9ff0e8bf76f5787ab325
scopeconfig:
Expand Down
2 changes: 1 addition & 1 deletion server/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import env from "env-var";

const environement = env.get("ENV").required().asEnum(["local", "recette", "production", "test"]);
const environement = env.get("ENV").required().asEnum(["local", "recette", "production", "test", "next"]);

const config = {
productName: env.get("PUBLIC_PRODUCT_NAME").required().asString(),
Expand Down
21 changes: 20 additions & 1 deletion ui/src/config.public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface PublicConfig {
host: string;
baseUrl: string;
apiEndpoint: string;
env: "local" | "recette" | "production";
env: "local" | "recette" | "production" | "next";
version: string;
productMeta: {
brandName: "sirius";
Expand All @@ -30,6 +30,22 @@ function getProductionPublicConfig(): PublicConfig {
};
}

function getNextPublicConfig(): PublicConfig {
const host = "https://sirius-next.inserjeunes.beta.gouv.fr";

return {
sentry: {
dsn: "https://f97984280f4e4a4e8075e8b353b9234a@sentry.incubateur.net/153",
},
host,
baseUrl: `https://${host}`,
env: "production",
apiEndpoint: `https://${host}/api`,
version: getVersion(),
productMeta: getProductMeta(),
};
}

function getRecettePublicConfig(): PublicConfig {
const host = "sirius-recette.inserjeunes.beta.gouv.fr";

Expand Down Expand Up @@ -92,6 +108,7 @@ function getEnv(): PublicConfig["env"] {
switch (env) {
case "production":
case "recette":
case "next":
case "local":
return env;
default:
Expand All @@ -105,6 +122,8 @@ function getPublicConfig(): PublicConfig {
return getProductionPublicConfig();
case "recette":
return getRecettePublicConfig();
case "next":
return getNextPublicConfig();
case "local":
return getLocalPublicConfig();
}
Expand Down

0 comments on commit 45d6567

Please sign in to comment.