From 3ab2d5002436423fc41d1ad68531e5674854dbd8 Mon Sep 17 00:00:00 2001 From: Art Date: Fri, 24 Sep 2021 14:53:16 +0300 Subject: [PATCH] 207. Deploying Angular Application (#32) --- README.md | 8 ++++++++ .../src/environments/environment.prod.ts | 4 +++- support-portal-frontend/src/environments/environment.ts | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d8a0199..d0489fb 100644 --- a/README.md +++ b/README.md @@ -80,3 +80,11 @@ Create EC2 instance with custom security rules - `ls -lh support-portal.jar` -> view permissions - `./support-portal.jar` +#### 207. Deploying Angular Application + +1. Build Angular Application + - `ng build --prod` +2. Upload dist/support-portal-frontend folder to EC2 + - `scp -r -i "certified-dev-assoc-course.pem" "C:\Users\Admin\IdeaProjects\Study\GetArrays\art-get-arrays-jwt-springsecurity-angular\support-portal-frontend\dist\*" ec2-user@ec2-13-51-129-89.eu-north-1.compute.amazonaws.com:~/` +3. Move files to httpd directory + - `sudo cp ~/support-portal-frontend/* /var/www/html` diff --git a/support-portal-frontend/src/environments/environment.prod.ts b/support-portal-frontend/src/environments/environment.prod.ts index 3612073..700f169 100644 --- a/support-portal-frontend/src/environments/environment.prod.ts +++ b/support-portal-frontend/src/environments/environment.prod.ts @@ -1,3 +1,5 @@ export const environment = { - production: true + production: true, + apiUrl: 'http://support-portal.shyshkin.net:5000', + publicUrls: ['/user/login', '/user/register', '/user/*/image/**', '/user/image/**'] }; diff --git a/support-portal-frontend/src/environments/environment.ts b/support-portal-frontend/src/environments/environment.ts index 5c95f57..39b9498 100644 --- a/support-portal-frontend/src/environments/environment.ts +++ b/support-portal-frontend/src/environments/environment.ts @@ -4,7 +4,8 @@ export const environment = { production: false, - apiUrl: 'http://localhost:8080', + apiUrl: 'http://support-portal.shyshkin.net:5000', + // apiUrl: 'http://localhost:8080', publicUrls: ['/user/login', '/user/register', '/user/*/image/**', '/user/image/**'] };