Cleanup env variables
This commit is contained in:
parent
fb74ffeeb2
commit
6ab8be4e58
|
|
@ -74,6 +74,10 @@ def main(app_name, image_name, environment_file):
|
|||
environment_variables={
|
||||
# 'DJANGO_SETTINGS_MODULE': 'config.settings.base',
|
||||
"VITE_APP_ENVIRONMENT": env.str("VITE_APP_ENVIRONMENT", "dev-feature"),
|
||||
"VITE_LOGOUT_REDIRECT": env.str(
|
||||
"VITE_LOGOUT_REDIRECT",
|
||||
"https://vbvdev.b2clogin.com/vbvdev.onmicrosoft.com/b2c_1_signupandsignin/oauth2/v2.0/logout/?post_logout_redirect_uri=https://vbv-lernwelt.control.iterativ.ch",
|
||||
),
|
||||
"IT_DEFAULT_ADMIN_PASSWORD": env.str("fWwoQzreIS5uztLOyF8jJpS9M"),
|
||||
"POSTGRES_HOST": f"srv-captain--{app_name}-postgres",
|
||||
"POSTGRES_PORT": 5432,
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ function generate_default_app_name() {
|
|||
# take app name as first argument or use the default generated app name
|
||||
APP_NAME=${1:-$(generate_default_app_name)}
|
||||
|
||||
VITE_SENTRY_ENV="development"
|
||||
|
||||
if [[ "$APP_NAME" == "myvbv" ]]; then
|
||||
VITE_LOGOUT_REDIRECT="https://edumgr.b2clogin.com/edumgr.onmicrosoft.com/b2c_1_signupandsignin/oauth2/v2.0/logout/?post_logout_redirect_uri=https://myvbv.iterativ.ch/"
|
||||
VITE_SENTRY_ENV="production"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import * as log from "loglevel";
|
|||
log.debug("AppFooter created");
|
||||
|
||||
const userStore = useUserStore();
|
||||
const hideVersion = import.meta.env.VITE_SENTRY_ENV === "production";
|
||||
const hideVersion = import.meta.env.VITE_APP_ENVIRONMENT.startsWith("prod");
|
||||
|
||||
async function changeLocale(language: AvailableLanguages) {
|
||||
userStore.setUserLanguages(language);
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ const app = createApp(App);
|
|||
|
||||
Sentry.init({
|
||||
app,
|
||||
environment: import.meta.env.VITE_SENTRY_ENV || "development",
|
||||
environment: import.meta.env.VITE_APP_ENVIRONMENT || "local",
|
||||
dsn: "https://2df6096a4fd94bd6b4802124d10e4b8d@o8544.ingest.sentry.io/4504157846372352",
|
||||
tracesSampleRate: 0.0,
|
||||
enabled:
|
||||
import.meta.env.VITE_SENTRY_ENV == "production" ||
|
||||
import.meta.env.VITE_SENTRY_ENV == "stage",
|
||||
import.meta.env.VITE_APP_ENVIRONMENT.startsWith("prod") ||
|
||||
import.meta.env.VITE_APP_ENVIRONMENT.startsWith("stage"),
|
||||
});
|
||||
|
||||
// todo: define lang setup
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ export const updateLoggedIn: NavigationGuard = async () => {
|
|||
export const redirectToLoginIfRequired: NavigationGuard = (to) => {
|
||||
const userStore = useUserStore();
|
||||
if (loginRequired(to) && !userStore.loggedIn) {
|
||||
const sentryEnv = import.meta.env.VITE_SENTRY_ENV;
|
||||
const ssoLogin = sentryEnv === "production" || sentryEnv === "staging";
|
||||
const sentryEnv = import.meta.env.VITE_APP_ENVIRONMENT;
|
||||
const ssoLogin = sentryEnv.startsWith("prod") || sentryEnv.startsWith("stage");
|
||||
return ssoLogin ? `/login?next=${to.fullPath}` : `/login-local?next=${to.fullPath}`;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -5,6 +5,4 @@
|
|||
encrypted: env_secrets/local_daniel.env
|
||||
encrypted: env_secrets/local_elia.env
|
||||
encrypted: env_secrets/local_lorenz.env
|
||||
encrypted: env_secrets/pg_backup_local.env
|
||||
encrypted: env_secrets/production.env
|
||||
encrypted: env_secrets/production_azure.json
|
||||
encrypted: env_secrets/prod-azure.json
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ SPECTACULAR_SETTINGS = {
|
|||
# Your stuff...
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if DEBUG:
|
||||
if APP_ENVIRONMENT == "local":
|
||||
SECRET_KEY = env(
|
||||
"IT_DJANGO_SECRET_KEY",
|
||||
default="J9FiYN31FuY7lHrmx9Mpai3GGpTVCxakEclOfCLretDe7bTf2DtTsgazJ0aIMtbq",
|
||||
|
|
|
|||
Loading…
Reference in New Issue