diff --git a/app/client/src/pages/LoginPage.tsx b/app/client/src/pages/LoginPage.tsx
index 92a77b1..ec8d618 100644
--- a/app/client/src/pages/LoginPage.tsx
+++ b/app/client/src/pages/LoginPage.tsx
@@ -52,7 +52,7 @@ function LoginPage({ onLogin, requestAuth }: LoginPageProps) {
Finus
- Bye bye
+ Welcome back
Log in to continue managing your finances.
diff --git a/app/client/src/utils/constants.ts b/app/client/src/utils/constants.ts
index bb3cdfa..34b4687 100644
--- a/app/client/src/utils/constants.ts
+++ b/app/client/src/utils/constants.ts
@@ -1,3 +1,3 @@
-export const BASE_URL = "http://3.150.23.72:3000";
+export const BASE_URL = "http://52.15.117.1:3000";
export const SESSION_STORAGE_KEY = "finus-session";
export const SIDEBAR_WIDTH = 260;
diff --git a/app/server/default_container.env b/app/server/default_container.env
index 6800694..76451cf 100644
--- a/app/server/default_container.env
+++ b/app/server/default_container.env
@@ -7,3 +7,7 @@ MARKET_SERVICE_ADDR=http://market:8000
MYSQL_HOST=database
MYSQL_PORT=3306
DB_NAME=finus
+
+#Use the CORS_ALLOWED_ORIGIN environment variable to
+#specify an additional (to localhost) non-localhost allowed origin.
+CORS_ALLOWED_ORIGIN=http://localhost
diff --git a/app/server/services/ts/common/expressUtils.ts b/app/server/services/ts/common/expressUtils.ts
index 0385b08..1a56b0d 100644
--- a/app/server/services/ts/common/expressUtils.ts
+++ b/app/server/services/ts/common/expressUtils.ts
@@ -4,7 +4,7 @@ const defaultMethods = ["GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"];
const origins = [
"http://localhost",
"http://localhost:8080",
- "http://18.190.215.135", //prod webserver
+ process.env.CORS_ALLOWED_ORIGIN
];
export function buildCorsConfig(opts?: { methods?: string[] }) {
diff --git a/deployment/infrastructure/main.tf b/deployment/infrastructure/main.tf
index 8a6e583..1d6e8c0 100644
--- a/deployment/infrastructure/main.tf
+++ b/deployment/infrastructure/main.tf
@@ -104,11 +104,16 @@ resource "aws_route_table" "route_table" {
}
}
+resource "aws_key_pair" "deployer" {
+ key_name = "prod-key"
+ public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOX3XB+BgcO5ft0OnL1uq1a3cBdHVieXviFqUgFN7p+m logan@nixos"
+}
+
module "prod" {
source = "./modules/finus"
environment_name = "prod"
- ssh_key_pair_name = "finus-dev"
+ ssh_key_pair_name = "prod-key"
security_group_ids = [aws_security_group.default.id]
webserver_security_group_ids = [aws_security_group.webserver.id]
backend_security_group_ids = [aws_security_group.services.id]
diff --git a/deployment/infrastructure/modules/finus/main.tf b/deployment/infrastructure/modules/finus/main.tf
index 52bd19d..26378f7 100644
--- a/deployment/infrastructure/modules/finus/main.tf
+++ b/deployment/infrastructure/modules/finus/main.tf
@@ -47,7 +47,7 @@ data "aws_ami" "amazon_linux" {
resource "aws_instance" "backend" {
- instance_type = "t2.nano"
+ instance_type = "t3.micro"
ami = data.aws_ami.amazon_linux.id
subnet_id = var.subnet_id
key_name = var.ssh_key_pair_name
@@ -59,7 +59,7 @@ resource "aws_instance" "backend" {
}
resource "aws_instance" "webserver" {
- instance_type = "t2.nano"
+ instance_type = "t3.micro"
ami = data.aws_ami.amazon_linux.id
subnet_id = var.subnet_id
key_name = var.ssh_key_pair_name
diff --git a/deployment/scripts/upgrade-images.sh b/deployment/scripts/upgrade-images.sh
index a96c7ab..aef7680 100755
--- a/deployment/scripts/upgrade-images.sh
+++ b/deployment/scripts/upgrade-images.sh
@@ -1,3 +1,4 @@
#!/bin/bash
sudo docker compose down
+sudo docker rmi $(sudo docker images -a -q)
sudo docker compose up -d --pull always
diff --git a/deployment/services/default_container.env b/deployment/services/default_container.env
index ce8659e..e9ca3a5 100644
--- a/deployment/services/default_container.env
+++ b/deployment/services/default_container.env
@@ -7,3 +7,5 @@ MARKET_SERVICE_ADDR=http://market:8000
MYSQL_HOST=finus-dev-database-1.cluster-cv8mki0o4cg9.us-east-2.rds.amazonaws.com
MYSQL_PORT=3306
DB_NAME=finus
+
+CORS_ALLOWED_ORIGIN=http://3.151.103.140