Skip to content

Angular app with passing env variable into entrypoint.sh

Notifications You must be signed in to change notification settings

gterdem/angular-env-docker-test

Repository files navigation

Angular Docker Environment Passing Test Application

This project was generated with Angular CLI. It is a basic angular app with nginx webserver running on docker. Project has an appconfig.production.json file under asset folder. Aim is to change the urls configured here by the .env variables supplied by .env file before each container starts.

Build

Rename .env.sample file to .env Run ng build --prod to build the project. Then run docker-compose build to build the image.

RUN

Run docker-compose up to run the application. You should see the new api and api urls on stdout. Navigate to (http://localhost:3005) to see the default angular application. You can sh into container with docker exec -it {containerName} sh command and see the change appconfig.production.json data with running cat /usr/share/nginx/html/assets/appconfig.production.json command.

About

Angular app with passing env variable into entrypoint.sh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published