How to manage environment variables in Angular apps when deploying on Kubernetes with Docker?

Discussão em 'Angular' iniciado por Rinkal, Dezembro 24, 2024.

  1. Rinkal

    Rinkal Guest

    Compile-time Configurations have Limitations In certain scenarios (like CI/CD pipelines or containerized environments), it can be inconvenient to rebuild the app every time the environment changes. so how to solve this problem and set environment variable in Kubernetes with docker .

    for production build i am run command ng build --configuration production and in this build it is contain the apiServer Url and secret key it is exposed in front-end if i am use browser development tools so i am easily access this secret key so how to manage this things

    here this is my environment.prod.ts

    export const environment = {
    production: true,
    firebase: {
    apiKey: "",
    authDomain:"",
    databaseURL:"",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: "",
    measurementId: ""
    },
    };

    Continue reading...

Compartilhe esta Página