| title | Configuration |
|---|---|
| description | Configure the Internal Developer Platform - Database, security, profiles, and environment variables |
The Internal Developer Platform uses Spring Boot's configuration system. This guide covers all configuration options.
The Internal Developer Platform uses YAML configuration files located in src/main/resources/:
| File | Purpose |
|---|---|
application.yml |
Base configuration |
application-local.yml |
Local development settings |
application-dev.properties |
Development environment |
Configure PostgreSQL connection:
spring:
datasource:
url: jdbc:postgresql://localhost:5432/idpcore
username: idpcore
password: ${DB_PASSWORD}
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: validate # Use Flyway for migrations
show-sql: false
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialectConfigure the database location to manage schema migrations:
spring:
flyway:
enabled: true
locations: classpath:db/migration
baseline-on-migrate: trueserver:
port: 8084
servlet:
context-path: /
compression:
enabled: trueConfigure CORS if your frontend loads from a different origin or if no API gateway handles CORS:
spring:
web:
cors:
allowed-origins:
- http://localhost:3000
- https://your-frontend.com
allowed-methods:
- GET
- POST
- PUT
- DELETE
allowed-headers: "*"We recommend OAuth 2.0 with JWT tokens for authentication and authorization.
spring:
security:
oauth2:
resourceserver:
jwt:
issuer-uri: https://your-auth-server.com
jwk-set-uri: https://your-auth-server.com/.well-known/jwks.jsonThe Internal Developer Platform supports multiple profiles for different deployment scenarios:
| Profile | Purpose |
|---|---|
local |
Local development with sample data |
dev |
Development environment |
test |
Testing with H2 in-memory database |
prod |
Production settings |
Via environment variable:
export SPRING_PROFILES_ACTIVE=localVia command line:
java -jar idp-core.jar --spring.profiles.active=localVia Docker:
docker run -e SPRING_PROFILES_ACTIVE=local decathlon/idp-coreAll configuration can be overridden using environment variables:
| Variable | Description | Example |
|---|---|---|
SPRING_PROFILES_ACTIVE |
Active profile | local |
SPRING_DATASOURCE_URL |
Database URL | jdbc:postgresql://... |
SPRING_DATASOURCE_USERNAME |
DB username | idpcore |
SPRING_DATASOURCE_PASSWORD |
DB password | secret |
SERVER_PORT |
HTTP port | 8084 |
LOGGING_LEVEL_ROOT |
Log level | INFO |
Spring Boot converts environment variables to properties:
SPRING_DATASOURCE_URL→spring.datasource.urlSERVER_PORT→server.portIDP_SECURITY_CLIENT_ID→idp.security.client-id
logging:
level:
root: INFO
com.decathlon.idp_core: DEBUG
org.springframework.web: INFO
org.hibernate.SQL: DEBUG
### Log Format (JSON for production)
```yaml
logging:
pattern:
console: '{"timestamp":"%d","level":"%p","logger":"%c","message":"%m"}%n'For observability, OpenTelemetry is becoming the standard. Rather than using tons of logs, we recommend configuring tracing and metrics with OpenTelemetry. By default, IDP-Core includes OpenTelemetry SDK instrumentation. Configure the exporter and sampling rate as follows:
management:
tracing:
enabled: true
sampling:
probability: 1.0
otlp:
tracing:
endpoint: http://otel-collector:4318/v1/traces
otel:
service:
name: idp-core
exporter:
otlp:
endpoint: http://otel-collector:4317spring:
datasource:
url: jdbc:postgresql://localhost:5437/idpcore
username: idpcore
password: idpcore_password
flyway:
locations: classpath:db/migration,classpath:db/local
server:
port: 8084
logging:
level:
com.decathlon.idp_core: DEBUGspring:
datasource:
url: ${DB_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
hikari:
maximum-pool-size: 20
minimum-idle: 5
server:
port: 8080
logging:
level:
root: WARN
com.decathlon.idp_core: INFO
management:
tracing:
enabled: true- Deployment Guide - Deploy to production
- Docker Configuration - Container settings
- Observability - Monitoring and tracing