From 72ff6e4c4d887c39e691d2d2d36830d1b90eef17 Mon Sep 17 00:00:00 2001 From: Art Date: Sat, 25 Sep 2021 18:44:49 +0300 Subject: [PATCH] 35.1 deploy MySQL into AWS RDS - with public access (#35, #32) --- README.md | 19 ++++++++++++- .../src/main/resources/application.yml | 28 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4afd821..f15f6d6 100644 --- a/README.md +++ b/README.md @@ -220,4 +220,21 @@ WantedBy=multi-user.target 9. Tune CORS for backend - add `http://portal.shyshkin.net` - \ No newline at end of file +##### 35.1 deploy MySQL into AWS RDS - with public access + +1. RDS Console + - MySQL 8.0.23 + - Dev/Test + - DB instance identifier: `portal-db` + - Master username: portal_user + - Master password: Supp0rt_Porta!_PAssword + - DB Instance: db.t3.micro + - Public access: yes +2. Additional configuration + - Initial database name: support_portal +3. Create DB +4. Create Security Group MySQLFromEverywheere + - allow port 3306 from everywhere (for testing purposes) +5. Attach SG MySQLFromEverywheere to DB instance + + \ No newline at end of file diff --git a/support-portal-backend/src/main/resources/application.yml b/support-portal-backend/src/main/resources/application.yml index 9102095..f83d68a 100644 --- a/support-portal-backend/src/main/resources/application.yml +++ b/support-portal-backend/src/main/resources/application.yml @@ -74,6 +74,34 @@ spring: username: AKIAVW7XGDOWFHHCELIH password: BJyWOWS1xWYR35MRCFn3BuuQ6vY+k7DRsdAvOfqDs/Fk +# we want to test (1) from localhost, (2) from S3 bucket Static Web Site, (3) from our EC2 instance +app: + email: + from: d.art.shishkin@gmail.com + carbon-copy: d.art.shishkin@gmail.com + cors: + allowed-origins: http://localhost:4200,http://art-support-portal.s3-website.eu-north-1.amazonaws.com,http://support-portal.shyshkin.net,http://portal.shyshkin.net +server: + port: 5000 +logging: + level: + net.shyshkin: debug + +--- +spring: + config: + activate: + on-profile: aws-rds + datasource: + url: jdbc:mysql://portal-db.coaum9neetxc.eu-north-1.rds.amazonaws.com:3306/support_portal + username: portal_user + password: Supp0rt_Porta!_PAssword + mail: + host: email-smtp.eu-north-1.amazonaws.com + port: 587 + username: AKIAVW7XGDOWFHHCELIH + password: BJyWOWS1xWYR35MRCFn3BuuQ6vY+k7DRsdAvOfqDs/Fk + # we want to test (1) from localhost, (2) from S3 bucket Static Web Site, (3) from our EC2 instance app: email: