ulsdevteam / ccvgd-frontend

Contemporary Chinese Village Gazetteer Data front end application
MIT License
2 stars 3 forks source link

ulsdevteam/ccvgd-integral#1: Provide Docker ARGs for production and API_ROOT #32

Closed ctgraham closed 2 years ago

ctgraham commented 2 years ago

This is one half of the changes to incorporate environment variables passed from the parent docker-compose into this project.

Angular does not support reading the system environment directly, so we need to replace/edit the environment.ts file.

I've added defaults for the arguments for the development settings for backwards compatibility. As I write this, though, the better strategy would have been to leave a dev environment.ts file in place, then use Docker to replace the environment variables in environment.prod.ts, and run the build with the prod flag.

Take a look at this, and when it make sense, complete the merge.