Usage of Angular & ASP:NET CORE - V12:
As part of a client project, we need to deliver our solution in containers. Specifically, we have two containers: one containing the Angular application and the other likely containing the ASP.NET Core component.
Our client has requested that we manage environment variables and configuration files outside of the Docker images to enhance security and flexibility. We would like to know if you have any recommendations or best practices for achieving this with ASP Zero-based solutions. Here are some specific points we are considering:
Creating a Dockerfile without including configuration files. Avoiding hard-coded configuration values in the Dockerfile. Building the Docker image.
4 Answer(s)
-
0
Hi @pliaspzero,
You can check this documents.
https://docs.aspnetzero.com/aspnet-core-angular/latest/Deployment-Angular-Docker https://docs.docker.com/compose/environment-variables/set-environment-variables/
-
0
Ok - thanks
How can I exclude appsettings.json & appsettings.Production.json (MVC API)
and for angular: assets/appconfig.json assets/appconfig.json assets/appconfig.k8s.json assets/appconfig.production.json - could this also be done in build-with-ng.ps1?
-
0
Ok - thanks
How can I exclude appsettings.json & appsettings.Production.json (MVC API)
and for angular: assets/appconfig.json assets/appconfig.json assets/appconfig.k8s.json assets/appconfig.production.json - could this also be done in build-with-ng.ps1?
-
0
Hi @pliaspzero,
The current docker files are being built in release mode. The command includes just
appsettings.Production.json
If you don't use it in your project, please remove it.I don't understand your second question. But you need to set your environments in docker
.yml
files