| title | Docker Deployment |
|---|---|
| description | Deploy IDP-Core with Docker and Docker Compose |
Deploy IDP-Core using Docker for development, testing, or small-scale production environments.
- Docker 20.10+
- Docker Compose 2.0+ (optional)
- 1 GB available memory
git clone https://github.com/decathlon/internal-developer-platform.git
cd internal-developer-platformdocker compose up -dThis starts:
- PostgreSQL on port 5432
# Check health
curl http://localhost:8080/actuator/health
# View logs
docker compose logs -f idp-coreIn addition to the docker-compose.yml file provided, you can customize your setup. Here is a basic example:
version: "3.8"
services:
idp-core:
build: .
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=local
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/idp
- SPRING_DATASOURCE_USERNAME=idp
- SPRING_DATASOURCE_PASSWORD=idp
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
postgres:
image: postgres:14-alpine
environment:
- POSTGRES_DB=idp
- POSTGRES_USER=idp
- POSTGRES_PASSWORD=idp
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U idp"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:docker run -d \
--name idp-core \
-p 8080:8080 \
-e SPRING_PROFILES_ACTIVE=dev \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://host.docker.internal:5432/idp \
-e SPRING_DATASOURCE_USERNAME=idp \
-e SPRING_DATASOURCE_PASSWORD=idp \
decathlon/internal-developer-platform:latestdocker run -d \
--name idp-core \
-p 8080:8080 \
-v $(pwd)/config:/app/config:ro \
-v $(pwd)/logs:/app/logs \
-e SPRING_CONFIG_ADDITIONAL_LOCATION=/app/config/ \
decathlon/internal-developer-platform:latest# Create network
docker network create idp-network
# Run PostgreSQL
docker run -d \
--name postgres \
--network idp-network \
-e POSTGRES_DB=idp \
-e POSTGRES_USER=idp \
-e POSTGRES_PASSWORD=idp \
postgres:14-alpine
# Run IDP-Core
docker run -d \
--name idp-core \
--network idp-network \
-p 8080:8080 \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/idp \
-e SPRING_DATASOURCE_USERNAME=idp \
-e SPRING_DATASOURCE_PASSWORD=idp \
decathlon/internal-developer-platform:latestTo build the Docker image locally, first build the JAR file:
mvn clean package -DskipTestsThen build and run the Docker image:
# Build
docker build -t internal-developer-platform:local .
# Run
docker run -d -p 8080:8080 internal-developer-platform:localIn addition of the provided Dockerfile, here is an example of a multi-stage build:
# Build stage
FROM eclipse-temurin:25-jdk-alpine AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN ./mvnw clean package -DskipTests
# Runtime stage
FROM eclipse-temurin:25-jre-alpine
WORKDIR /app
# Create non-root user
RUN addgroup -g 1000 idp && \
adduser -u 1000 -G idp -s /bin/sh -D idp
COPY --from=build /app/target/*.jar app.jar
RUN chown -R idp:idp /app
USER idp
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD curl -f http://localhost:8080/actuator/health || exit 1
ENTRYPOINT ["java", "-jar", "app.jar"]| Variable | Description | Default |
|---|---|---|
SPRING_PROFILES_ACTIVE |
Active Spring profile | dev |
SERVER_PORT |
HTTP port | 8080 |
JAVA_OPTS |
JVM options | - |
| Variable | Description | Required |
|---|---|---|
SPRING_DATASOURCE_URL |
JDBC URL | Yes |
SPRING_DATASOURCE_USERNAME |
DB username | Yes |
SPRING_DATASOURCE_PASSWORD |
DB password | Yes |
| Variable | Description | Default |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT |
OTLP endpoint | - |
OTEL_SERVICE_NAME |
Service name | idp-core |
LOG_LEVEL |
Root log level | INFO |
# Start all
docker compose up -d
# Start specific service
docker compose up -d idp-core
# View logs
docker compose logs -f idp-core# Stop all
docker compose down
# Stop and remove volumes
docker compose down -v# Pull latest images
docker compose pull
# Recreate containers
docker compose up -d --force-recreate# Run 3 instances
docker compose up -d --scale idp-core=3The database schema is managed by Flyway and applies automatically on startup.
docker exec postgres pg_dump -U idp idp > backup.sqlcat backup.sql | docker exec -i postgres psql -U idp idp# Check logs
docker logs idp-core
# Common issues:
# - Database not ready: ensure depends_on with healthcheck
# - Port conflict: change port mapping
# - Memory: increase Docker memory limit# Verify database is running
docker exec postgres pg_isready -U idp
# Check network
docker network inspect bridge
# Test connection from app container
docker exec idp-core nc -zv postgres 5432- Kubernetes - Production deployment
- Configuration - All configuration options
- Observability - Monitoring and logging