Skip to content

Multiple Environments

The documentation applies to:✅ v0.8.0

Angular SPA Web

File name Description
environment.ts Useful for developer's PC
environment.local.ts Useful for deploying server-side on a same VM, it is created for Front-end Developer
environment.docker.ts Useful for deploying server-side on Docker, you need to check a configurationEndpoint that matches public endpoint of server-side
environment.dockerlocal.ts Useful for deploying server-side on Docker as the same PC, it is created for Front-end Developer
environment.prod.ts Useful for Production
environment.prodlocal.ts Useful for Production when deploying on intranet (Local DNS)

New environment

First, you create a new file environment.{your_env}.ts, then you need to add your new environment on angular.json file. Two places are:

``` json tab="configurations" { "projects": { "architect": { "configurations":{ "your_new_env": { // You should copy "prod" property to put here } } } } }

``` json tab="serve"
{
    "projects": {
        "architect": {
            "serve":{
                "configurations": {
                    "your_new_env": {
                        "browserTarget": "web-portal:build:{your_new_env}"
                    }
                }
            }
        }
    }
}

.NET Core API

File Name Description
appsettings.json Useful for developer's PC
appsettings.Development.json Same above
appsettings.Local.json Useful for deploying one VM both Staging and Production
appsettings.Docker.json Useful for running on Docker both Staging and Production
appsettings.DockerLocal.json Useful for running on Docker and accessable from Host, for Dev

Production file

You will ask for Production file. Regarding to your deployment model, you need to copy an appropriate appsettings.json to appsettings.Production.json. For example: you choose to deploy on one VM, so you should copy appsettings.Local.json to appsettings.Production.json. We strongly recommend this way because you will face a lot of changes on Production file.