Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/client/src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function LoginPage({ onLogin, requestAuth }: LoginPageProps) {
<Badge variant="outline" className="auth-tag">
Finus
</Badge>
<CardTitle className="auth-title">Bye bye</CardTitle>
<CardTitle className="auth-title">Welcome back</CardTitle>
<CardDescription className="auth-copy text-base">
Log in to continue managing your finances.
</CardDescription>
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 4 additions & 0 deletions app/server/default_container.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/server/services/ts/common/expressUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] }) {
Expand Down
7 changes: 6 additions & 1 deletion deployment/infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions deployment/infrastructure/modules/finus/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions deployment/scripts/upgrade-images.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions deployment/services/default_container.env
Original file line number Diff line number Diff line change
Expand Up @@ -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