Skip to content

Commit a8c7d6a

Browse files
committed
feat(src): remove mailgun
1 parent 0d73349 commit a8c7d6a

File tree

7 files changed

+83
-104
lines changed

7 files changed

+83
-104
lines changed

env/.test.env

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,3 @@ THROTTLER_NAME=THROTTLER
2424
THROTTLER_TTL=60000
2525
THROTTLER_LIMIT=10
2626

27-
## MAILGUN
28-
MAILGUN_API_KEY=5a7a101a34138a00e20683e3fcb07f23-7ecaf6b5-b7bae0b8
29-
MAILGUN_USER_NAME=api
30-
MAILGUN_FROM=LUPPA <no-reply.luppa@mg.wocex.io>
31-
MAILGUN_EMAIL_DOMAIN=mg.wocex.io

src/app.module.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { JwtAuthGuard } from './common/guards/jwt-auth.guard';
1212
import { APP_GUARD } from '@nestjs/core';
1313
import { PersonaModule } from './modules/persona/persona.module';
1414
import { MasterTablesModule } from './modules/master-tables/master-tables.module';
15-
import mailgunConfig from './config/mailgun.config';
1615
import { TypeOrmModule } from '@nestjs/typeorm';
1716
import { LoanInformationModule } from './modules/loan-information/loan-information.module';
1817
import { MortgageInformationModule } from './modules/mortgage-information/mortgage-information.module';
@@ -48,13 +47,7 @@ import { BridgeLoanModule } from './modules/bridge-loan/bridge-loan.module';
4847
imports: [
4948
ConfigModule.forRoot({
5049
envFilePath: `./env/.${process.env.NODE_ENV}.env`,
51-
load: [
52-
serverConfig,
53-
databaseConfig,
54-
jwtConfig,
55-
throttlerConfig,
56-
mailgunConfig,
57-
],
50+
load: [serverConfig, databaseConfig, jwtConfig, throttlerConfig],
5851
isGlobal: true,
5952
}),
6053
TypeOrmModule.forRootAsync({

src/common/services/mail/mail.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export class MailService {
1313
constructor(private configService: ConfigService) {
1414
const mailgun = new Mailgun(FormData);
1515
this.clientMailGun = mailgun.client({
16-
username: this.configService.get<string>('mailgun.userName'),
17-
key: this.configService.get<string>('mailgun.key'),
16+
username: 'username', //this.configService.get<string>('mailgun.userName'),
17+
key: 'key', //this.configService.get<string>('mailgun.key'),
1818
});
1919
}
2020

src/config/mailgun.config.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
# Load Balancer (ALB)
2-
resource "aws_lb" "main" {
3-
name = "fuap-app-dev-alb"
4-
internal = false
5-
load_balancer_type = "application"
6-
security_groups = [
7-
aws_security_group.lb.id,
8-
]
9-
10-
subnet_mapping {
11-
subnet_id = aws_subnet.public_a.id # Reemplaza con el ID de la subred pública donde se ubicará el ALB
12-
}
13-
14-
subnet_mapping {
15-
subnet_id = aws_subnet.public_b.id # Subred en AZ B
16-
}
17-
18-
tags = {
19-
Name = "fuap-app-dev-alb"
20-
}
21-
}
22-
23-
# Target Group
24-
resource "aws_lb_target_group" "main" {
25-
name = "fuap-app-dev-target-group"
26-
port = 3000 # Puerto donde escucha tu aplicación (por ejemplo, NestJS)
27-
protocol = "HTTP"
28-
target_type = "ip"
29-
30-
vpc_id = aws_vpc.main.id # Reemplaza con el ID de tu VPC
31-
32-
health_check {
33-
path = "/api/docs"
34-
protocol = "HTTP"
35-
timeout = 5
36-
interval = 30
37-
healthy_threshold = 2
38-
unhealthy_threshold = 2
39-
}
40-
41-
tags = {
42-
Name = "fuap-app-dev-target-group"
43-
}
44-
}
45-
46-
# Listener
47-
resource "aws_lb_listener" "main" {
48-
load_balancer_arn = aws_lb.main.arn
49-
port = "80"
50-
protocol = "HTTP"
51-
52-
default_action {
53-
type = "forward"
54-
target_group_arn = aws_lb_target_group.main.arn
55-
}
56-
}
1+
# # Load Balancer (ALB)
2+
# resource "aws_lb" "main" {
3+
# name = "fuap-app-dev-alb"
4+
# internal = false
5+
# load_balancer_type = "application"
6+
# security_groups = [
7+
# aws_security_group.lb.id,
8+
# ]
9+
10+
# subnet_mapping {
11+
# subnet_id = aws_subnet.public_a.id # Reemplaza con el ID de la subred pública donde se ubicará el ALB
12+
# }
13+
14+
# subnet_mapping {
15+
# subnet_id = aws_subnet.public_b.id # Subred en AZ B
16+
# }
17+
18+
# tags = {
19+
# Name = "fuap-app-dev-alb"
20+
# }
21+
# }
22+
23+
# # Target Group
24+
# resource "aws_lb_target_group" "main" {
25+
# name = "fuap-app-dev-target-group"
26+
# port = 3000 # Puerto donde escucha tu aplicación (por ejemplo, NestJS)
27+
# protocol = "HTTP"
28+
# target_type = "ip"
29+
30+
# vpc_id = aws_vpc.main.id # Reemplaza con el ID de tu VPC
31+
32+
# health_check {
33+
# path = "/api/docs"
34+
# protocol = "HTTP"
35+
# timeout = 5
36+
# interval = 30
37+
# healthy_threshold = 2
38+
# unhealthy_threshold = 2
39+
# }
40+
41+
# tags = {
42+
# Name = "fuap-app-dev-target-group"
43+
# }
44+
# }
45+
46+
# # Listener
47+
# resource "aws_lb_listener" "main" {
48+
# load_balancer_arn = aws_lb.main.arn
49+
# port = "80"
50+
# protocol = "HTTP"
51+
52+
# default_action {
53+
# type = "forward"
54+
# target_group_arn = aws_lb_target_group.main.arn
55+
# }
56+
# }

terraform/fuap-backend/security_groups.tf

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@ resource "aws_security_group" "rds" {
4141
}
4242
}
4343

44-
resource "aws_security_group" "lb" {
45-
vpc_id = aws_vpc.main.id
46-
tags = {
47-
Name = "lb-sg"
48-
}
44+
# resource "aws_security_group" "lb" {
45+
# vpc_id = aws_vpc.main.id
46+
# tags = {
47+
# Name = "lb-sg"
48+
# }
4949

50-
ingress {
51-
from_port = 80
52-
to_port = 80
53-
protocol = "tcp"
54-
cidr_blocks = ["0.0.0.0/0"]
55-
}
50+
# ingress {
51+
# from_port = 80
52+
# to_port = 80
53+
# protocol = "tcp"
54+
# cidr_blocks = ["0.0.0.0/0"]
55+
# }
5656

57-
ingress {
58-
from_port = 4433
59-
to_port = 4433
60-
protocol = "tcp"
61-
cidr_blocks = ["0.0.0.0/0"]
62-
}
57+
# ingress {
58+
# from_port = 4433
59+
# to_port = 4433
60+
# protocol = "tcp"
61+
# cidr_blocks = ["0.0.0.0/0"]
62+
# }
6363

64-
egress {
65-
from_port = 0
66-
to_port = 0
67-
protocol = "-1"
68-
cidr_blocks = ["0.0.0.0/0"]
69-
}
70-
}
64+
# egress {
65+
# from_port = 0
66+
# to_port = 0
67+
# protocol = "-1"
68+
# cidr_blocks = ["0.0.0.0/0"]
69+
# }
70+
# }

terraform/fuap-backend/variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ variable "db_engine" {
4646
default = "postgres"
4747
}
4848

49-
5049
variable "db_username" {
5150
description = "User developer"
5251
type = string

0 commit comments

Comments
 (0)