Skip to content

Commit 57ad435

Browse files
committed
chore(config): add demo profile and expose missing prod env vars
1 parent 66bf381 commit 57ad435

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Demo profile — same defaults as local; override via env vars
2+
spring.config.import=optional:file:./.env[.properties]
3+
4+
# PostgreSQL
5+
spring.datasource.url=${DB_URL:jdbc:postgresql://localhost:5432/garden}
6+
spring.datasource.username=${DB_USERNAME:garden}
7+
spring.datasource.password=${DB_PASSWORD:garden}
8+
9+
# MinIO (S3-compatible)
10+
storage.endpoint=${STORAGE_ENDPOINT:http://localhost:9000}
11+
storage.bucket=${STORAGE_BUCKET:garden}
12+
storage.private-bucket=${STORAGE_PRIVATE_BUCKET:garden-private}
13+
storage.access-key=${STORAGE_ACCESS_KEY:minioadmin}
14+
storage.secret-key=${STORAGE_SECRET_KEY:minioadmin}
15+
storage.base-url=${STORAGE_BASE_URL:http://localhost:9000/garden}
16+
17+
# Mail — defaults to local dummy (MailHog/no-op)
18+
spring.mail.host=${MAIL_HOST:localhost}
19+
spring.mail.port=${MAIL_PORT:1025}
20+
spring.mail.username=${MAIL_USERNAME:}
21+
spring.mail.password=${MAIL_PASSWORD:}
22+
spring.mail.properties.mail.smtp.auth=${MAIL_SMTP_AUTH:false}
23+
spring.mail.properties.mail.smtp.starttls.enable=${MAIL_SMTP_STARTTLS:false}
24+
25+
# JWT secret
26+
app.jwt.secret=${JWT_SECRET:bG9jYWxEZXZTZWNyZXRLZXlUaGF0SXNBdExlYXN0MzJCeXRlc0xvbmc=}
27+
28+
# Google OAuth2
29+
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID:local-client-id}
30+
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET:local-client-secret}

src/main/resources/application-prod.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,30 @@
22
springdoc.api-docs.enabled=false
33
springdoc.swagger-ui.enabled=false
44

5+
# Database
6+
spring.datasource.url=${DB_URL}
7+
spring.datasource.username=${DB_USERNAME}
8+
spring.datasource.password=${DB_PASSWORD}
9+
510
# Cloudflare R2 (S3-compatible) — set these env vars at deploy time
611
storage.endpoint=${STORAGE_ENDPOINT}
712
storage.bucket=${STORAGE_BUCKET}
813
storage.private-bucket=${STORAGE_PRIVATE_BUCKET}
914
storage.access-key=${STORAGE_ACCESS_KEY}
1015
storage.secret-key=${STORAGE_SECRET_KEY}
1116
storage.base-url=${STORAGE_BASE_URL}
17+
18+
# Mail
19+
spring.mail.host=${MAIL_HOST}
20+
spring.mail.port=${MAIL_PORT}
21+
spring.mail.username=${MAIL_USERNAME}
22+
spring.mail.password=${MAIL_PASSWORD}
23+
spring.mail.properties.mail.smtp.auth=${MAIL_SMTP_AUTH:true}
24+
spring.mail.properties.mail.smtp.starttls.enable=${MAIL_SMTP_STARTTLS:true}
25+
26+
# Google OAuth2
27+
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
28+
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
29+
30+
# Admin notifications (optional)
31+
app.admin-notification-email=${ADMIN_NOTIFICATION_EMAIL:}

0 commit comments

Comments
 (0)