Skip to content

Commit 1f9b3b7

Browse files
committed
replace sendgrid with resend
1 parent 1318708 commit 1f9b3b7

File tree

8 files changed

+27
-31
lines changed

8 files changed

+27
-31
lines changed

backend/spring-boot/docker-compose-api.dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ services:
2424
USER_PASSWORD: ${USER_PASSWORD:-qwerty123}
2525
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-client_id}
2626
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-client_secret}
27-
SMTP_HOST: ${SMTP_HOST:-smtp.sendgrid.net}
27+
SMTP_HOST: ${SMTP_HOST:-smtp.resend.com}
2828
SMTP_PORT: ${SMTP_PORT:-587}
29-
SMTP_USERNAME: ${SMTP_USER:-apikey}
29+
SMTP_USERNAME: ${SMTP_USER:-resend}
3030
SMTP_PASSWORD: ${SMTP_PASSWORD:-password}
31-
SMTP_SENDER: ${SMTP_SENDER:-office@bugzkit.com}
31+
SMTP_SENDER: ${SMTP_SENDER:-noreply@bugzkit.com}
3232
JWT_SECRET: ${JWT_SECRET:-secret}
3333
ACCESS_TOKEN_DURATION: ${ACCESS_TOKEN_DURATION:-900}
3434
REFRESH_TOKEN_DURATION: ${REFRESH_TOKEN_DURATION:-604800}

backend/spring-boot/src/main/java/org/bugzkit/api/shared/config/SpringDocConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,29 @@
44
import io.swagger.v3.core.converter.ModelConverters;
55
import io.swagger.v3.oas.models.Components;
66
import io.swagger.v3.oas.models.OpenAPI;
7-
import io.swagger.v3.oas.models.info.Contact;
87
import io.swagger.v3.oas.models.info.Info;
98
import io.swagger.v3.oas.models.info.License;
109
import io.swagger.v3.oas.models.security.SecurityScheme;
1110
import org.bugzkit.api.shared.error.ErrorMessage;
1211
import org.springdoc.core.customizers.OpenApiCustomizer;
12+
import org.springframework.beans.factory.annotation.Value;
1313
import org.springframework.context.annotation.Bean;
1414
import org.springframework.context.annotation.Configuration;
1515

1616
@Configuration
1717
public class SpringDocConfig {
1818

19+
@Value("${spring.application.name}")
20+
private String appName;
21+
1922
@Bean
2023
public OpenAPI openAPI() {
2124
return new OpenAPI()
2225
.info(
2326
new Info()
24-
.title("bugzkit")
27+
.title(appName)
2528
.description("A production-ready web application template")
2629
.version("1.0.0")
27-
.contact(new Contact().email("office@bugzkit.com"))
2830
.license(
2931
new License()
3032
.name("MIT License")

backend/spring-boot/src/main/resources/application.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ spring:
2929
database: ${REDIS_DATABASE:0}
3030
timeout: 60
3131
mail:
32-
host: ${SMTP_HOST:smtp.sendgrid.net}
32+
host: ${SMTP_HOST:smtp.resend.com}
3333
port: ${SMTP_PORT:587}
34-
username: ${SMTP_USER:apikey}
34+
username: ${SMTP_USER:resend}
3535
properties:
36-
sender: ${SMTP_SENDER:office@bugzkit.com}
36+
sender: ${SMTP_SENDER:noreply@bugzkit.com}
3737
mail:
3838
smtp:
3939
auth: true

backend/spring-boot/src/test/resources/application.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ spring:
5050
client-secret: ${GOOGLE_CLIENT_SECRET:client_secret}
5151
scope: profile,email
5252
mail:
53-
host: ${SMTP_HOST:smtp.sendgrid.net}
53+
host: ${SMTP_HOST:smtp.resend.com}
5454
port: ${SMTP_PORT:587}
55-
username: ${SMTP_USER:apikey}
55+
username: ${SMTP_USER:resend}
5656
password: ${SMTP_PASSWORD:password}
5757
properties:
58-
sender: ${SMTP_SENDER:office@bugzkit.com}
58+
sender: ${SMTP_SENDER:noreply@bugzkit.com}
5959
mail:
6060
smtp:
6161
auth: true
@@ -75,4 +75,3 @@ jwt:
7575

7676
rate-limit:
7777
enabled: false
78-

docker-compose.dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ services:
2626
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-client_id}
2727
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-client_secret}
2828
USER_PASSWORD: ${USER_PASSWORD:-qwerty123}
29-
SMTP_HOST: ${SMTP_HOST:-smtp.sendgrid.net}
29+
SMTP_HOST: ${SMTP_HOST:-smtp.resend.com}
3030
SMTP_PORT: ${SMTP_PORT:-587}
31-
SMTP_USERNAME: ${SMTP_USER:-apikey}
31+
SMTP_USERNAME: ${SMTP_USER:-resend}
3232
SMTP_PASSWORD: ${SMTP_PASSWORD:-password}
33-
SMTP_SENDER: ${SMTP_SENDER:-office@bugzkit.com}
33+
SMTP_SENDER: ${SMTP_SENDER:-noreply@bugzkit.com}
3434
JWT_SECRET: ${JWT_SECRET:-secret}
3535
ACCESS_TOKEN_DURATION: ${ACCESS_TOKEN_DURATION:-900}
3636
REFRESH_TOKEN_DURATION: ${REFRESH_TOKEN_DURATION:-604800}

docker-compose.prod.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ services:
1414
REDIS_HOST: ${REDIS_HOST:-redis}
1515
REDIS_PORT: ${REDIS_PORT:-6379}
1616
REDIS_DATABASE: ${REDIS_DATABASE:-0}
17-
SMTP_HOST: ${SMTP_HOST:-smtp.sendgrid.net}
17+
SMTP_HOST: ${SMTP_HOST:-smtp.resend.com}
1818
SMTP_PORT: ${SMTP_PORT:-587}
19-
SMTP_USER: ${SMTP_USER:-apikey}
20-
SMTP_SENDER: ${SMTP_SENDER:-office@bugzkit.com}
19+
SMTP_USER: ${SMTP_USER:-resend}
20+
SMTP_SENDER: ${SMTP_SENDER:-noreply@bugzkit.com}
2121
ACCESS_TOKEN_DURATION: ${ACCESS_TOKEN_DURATION:-900}
2222
REFRESH_TOKEN_DURATION: ${REFRESH_TOKEN_DURATION:-604800}
2323
VERIFY_EMAIL_TOKEN_DURATION: ${VERIFY_EMAIL_TOKEN_DURATION:-900}
@@ -163,7 +163,7 @@ services:
163163
- --providers.docker=true
164164
- --providers.docker.network=web
165165
- --providers.docker.exposedbydefault=false
166-
- --certificatesresolvers.myresolver.acme.email=${ACME_EMAIL:-office@bugzkit.com}
166+
- --certificatesresolvers.myresolver.acme.email=office@bugzkit.com
167167
- --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
168168
- --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
169169
networks:

docs/src/content/environment-variables.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
| REDIS_PASSWORD | Redis password | root |
1919
| GOOGLE_CLIENT_ID | Google client id used by oauth2 | client_id |
2020
| GOOGLE_CLIENT_SECRET | Google client secret used by oauth2 | client_secret |
21-
| SMTP_HOST | SMTP server host | smtp.sendgrid.net |
21+
| SMTP_HOST | SMTP server host | smtp.resend.com |
2222
| SMTP_PORT | SMTP server port | 587 |
23-
| SMTP_USER | SMTP user | apikey |
23+
| SMTP_USER | SMTP user | resend |
2424
| SMTP_PASSWORD | SMTP password | password |
25-
| SMTP_SENDER | SMTP sender | office@bugzkit.com |
25+
| SMTP_SENDER | SMTP sender | noreply@bugzkit.com |
2626
| JWT_SECRET | Secret key for signing JWTs | secret |
2727
| ACCESS_TOKEN_DURATION | Duration of the access token in seconds | 900 (15 minutes) |
2828
| REFRESH_TOKEN_DURATION | Duration of the refresh token in seconds | 604800 (7 days) |

scripts/init-vps.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ apt_install() { DEBIAN_FRONTEND=noninteractive apt-get install -y -qq "$@"; }
3737
# ==============================================================================
3838
echo ""
3939
echo "========================================"
40-
echo " Bugzkit — Production VPS Init"
40+
echo " bugzkit — Production VPS Init"
4141
echo "========================================"
4242
echo ""
4343

@@ -47,11 +47,6 @@ read -rp "Deploy username (will be created): " DEPLOY_USER
4747
read -rp "SSH public key for $DEPLOY_USER: " SSH_PUB_KEY
4848
[[ -z "$SSH_PUB_KEY" ]] && die "SSH public key cannot be empty."
4949

50-
echo ""
51-
echo "--- Stack configuration (Enter to keep default) ---"
52-
read -rp " ACME / Let's Encrypt email [office@bugzkit.com]: " ACME_EMAIL
53-
ACME_EMAIL="${ACME_EMAIL:-office@bugzkit.com}"
54-
5550
echo ""
5651
echo "--- Secrets (input is hidden) ---"
5752

@@ -364,11 +359,11 @@ if [[ ! -f "$COMPOSE_FILE" ]]; then
364359
echo ""
365360
echo " Copy the file manually, then run:"
366361
echo " cd $APP_DIR"
367-
echo " ACME_EMAIL=$ACME_EMAIL docker compose -f docker-compose.prod.yml up -d"
362+
echo " docker compose -f docker-compose.prod.yml up -d"
368363
else
369364
info "Deploying stack…"
370365
cd "$APP_DIR"
371-
ACME_EMAIL="$ACME_EMAIL" docker compose -f docker-compose.prod.yml up -d
366+
docker compose -f docker-compose.prod.yml up -d
372367
success "Stack deployed."
373368
echo ""
374369
info "Service status: docker compose -f $COMPOSE_FILE ps"

0 commit comments

Comments
 (0)