Skip to content

Fix/mos 0003#8

Merged
Lidizz merged 3 commits into
mainfrom
fix/MOS-0003
Feb 25, 2026
Merged

Fix/mos 0003#8
Lidizz merged 3 commits into
mainfrom
fix/MOS-0003

Conversation

@Lidizz

@Lidizz Lidizz commented Feb 25, 2026

Copy link
Copy Markdown
Owner

No description provided.

Create application-prod.yml with:
- Database credentials from environment variables (DB_URL, DB_USERNAME, DB_PASSWORD)
- HikariCP pool size 20 (vs 10 in dev)
- show-sql disabled, minimal logging (WARN/INFO)
- Flyway baseline-on-migrate disabled (schema must pre-exist)
- Devtools disabled
- Actuator show-details: never (prevent info leakage)
- Stock data update-enabled: true with monthly cron
- CORS allowed-origins from CORS_ALLOWED_ORIGINS env var
- Twelve Data API key required (no empty default)
Replace hardcoded localhost origins in WebConfig.java with
@value(app.cors.allowed-origins) injected from YAML.

- dev: http://localhost:5173, http://127.0.0.1:5173 (Vite dev server)
- prod: from CORS_ALLOWED_ORIGINS env var (set in application-prod.yml)

This allows production deployment with real domain origins without
code changes  just set the environment variable.
- Change actuator show-details from 'always' to 'when-authorized' (safe default)
- Base logging at INFO level (dev profile overrides to DEBUG)
- Keep spring.profiles.active: dev as default  production overrides via
  SPRING_PROFILES_ACTIVE=prod environment variable
@Lidizz
Lidizz merged commit 46d6edf into main Feb 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant