From a6eee3d2f272da141a0f27f5f047b403269fc54a Mon Sep 17 00:00:00 2001 From: Art Date: Mon, 27 Sep 2021 11:00:41 +0300 Subject: [PATCH] 36.1.a Create subdomain for Beanstalk environment (#36, #32) --- README.md | 12 +++++++++++- .../src/environments/environment.ts | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca5951f..266c17b 100644 --- a/README.md +++ b/README.md @@ -320,7 +320,7 @@ systemctl restart docker - `'~/supportportal' cannot be relativized, cannot resolve arbitrary user home paths.` - add `/home/ec2-user/supportportal:/root/supportportal` - success -#### 36 Deplay Spring Boot JAR file on AWS Elastic Beanstalk +#### 36 Deploy Spring Boot JAR file on AWS Elastic Beanstalk 1. Info about deployment Spring Boot app on AWS - AWS EBS expects for your apps to listen on port 5000 @@ -361,5 +361,15 @@ systemctl restart docker - modify `environment.ts` - `ng serve` - `localhost:4200` -> OK +7. Create subdomain for beanstalk environment + - Route 53 console + - Create new Record for hosted zone `shyshkin.net` + - Record name: `portal-bean` + - Record type A + - Route traffic to `Alias to Elastic Beanstalk` + - `Supportportalbackend-env.eba-wfr5wya3.eu-north-1.elasticbeanstalk.com` + - Visit `http://portal-bean.shyshkin.net` -> have a response from spring boot app -> OK + - Test with Angular App: `localhost:4200` + diff --git a/support-portal-frontend/src/environments/environment.ts b/support-portal-frontend/src/environments/environment.ts index f8ba601..86b6c1b 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://supportportalbackend-env.eba-wfr5wya3.eu-north-1.elasticbeanstalk.com', + apiUrl: 'http://portal-bean.shyshkin.net', + // apiUrl: 'http://supportportalbackend-env.eba-wfr5wya3.eu-north-1.elasticbeanstalk.com', // apiUrl: 'http://support-portal.shyshkin.net:5000', // apiUrl: 'http://localhost:8080', publicUrls: ['/user/login', '/user/register', '/user/*/image/**', '/user/image/**']