Creation and deployment of Angular frontend app using docker.
Requirements:
1. Nodejs
cmd to install Nodejs
-$ sudo apt install nodejs
2. NPM
cmd for NPM
-$ sudo apt install npm
3. Angular CLI
cmd to install Angular CLI
-$ sudo npm install -g @angular/cli
4. V S Code
5. Docker desktop
6. NGINX
Step 1: Install all dependencies and packages
Step 2: Create new angular project with all default settings
cmd for that:
-$ ng new angular-app --defaults
Step 3: Run the app
-$ cd angular app
-$ ng serve
Step 4: Our app is running on port 4200 directly
Step 5: Now same project we will deploy using docker and NGINX
For that we will open our project in V S code and create a Dockerfile for image building, we can also
do it directly into terminal itself.
Step 6: Build the docker-image from it
Step 7: Run Container
Step 8: App is running on port 80 inside docker container through NGINX web server