This page covers all post-installation configuration options available in the CI/CD stack. Most Jenkins settings are applied through Groovy init scripts that run automatically on container startup, while SonarQube, Nexus, and application server settings are driven by environment variables inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/infra-neo/CICD/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose.yml. For production hardening — adding resource limits, health checks, and pinned image versions — see the Docker Compose Override guide.
Jenkins Configuration
Jenkins is pre-configured through a set of Groovy scripts located injenkins/init.groovy.d/. These scripts run once when the Jenkins container starts and are the recommended way to automate any configuration change.
Changing Admin Credentials
Editjenkins/init.groovy.d/01-admin-user.groovy and replace the username and password arguments in the createAccount call:
Adding Plugins
Editjenkins/init.groovy.d/02-install-plugins.groovy and add plugin short names to the list. The plugins are downloaded from the Jenkins update centre on the next container start.
Plugin installation requires internet access from the Jenkins container. If
your environment is air-gapped, pre-download the
.hpi files and mount them
into /usr/share/jenkins/ref/plugins/ before starting the container.Customising the Maven Version
Editjenkins/init.groovy.d/05-configure-maven.groovy and change the version string in both the installer and the installation name:
tools {} blocks.
Adding JDK Installations
Create a new filejenkins/init.groovy.d/06-configure-jdk.groovy with the following content. Adjust the JDK path to match the installation inside the Jenkins container image:
SonarQube Configuration
Changing Database Credentials
SonarQube uses PostgreSQL as its backend. The database credentials are set via environment variables on both thepostgres and sonarqube services in docker-compose.yml. Both blocks must be updated together so they remain consistent:
Quality Profiles and Gates
Quality profiles and quality gates can be managed through three mechanisms:- Web UI — navigate to
http://localhost:9000/profilesto create, copy, or activate language-specific quality profiles. - REST API — use the SonarQube Web API (documented at
http://localhost:9000/web_api) to script profile changes as part of a bootstrap pipeline. - Backup/Restore — export a quality profile from one SonarQube instance and import it into another via Administration → Quality Profiles → Restore.
Custom sonar.properties via Volume Mount
Create a local file at sonarqube/conf/sonar.properties with your overrides:
docker-compose.yml:
Nexus Configuration
Creating Maven Repositories
Nexus ships without pre-created repositories. The recommended approach is to create them via the Groovy script API. Createnexus/nexus-config.groovy:
maven-releases and maven-snapshots hosted repositories manually through the Nexus UI at Administration → Repository → Repositories → Create repository.
Memory Tuning
Nexus JVM heap is controlled by theINSTALL4J_ADD_VM_PARAMS environment variable. Edit the value in docker-compose.yml:
-Xms512m -Xmx512m -XX:MaxDirectMemorySize=273m, which is conservative. Increase heap for repositories serving large artifacts or many concurrent users.
Resource Limits
Docker Compose supports CPU and memory resource constraints through thedeploy.resources block. Add limits to any service in docker-compose.yml:
Resource limits under
deploy: are honoured by Docker when using the
docker compose CLI (Compose v2) directly. The docker stack deploy
Swarm path also respects them. If you are running Docker Desktop, ensure
sufficient memory is allocated to the Docker engine in the Desktop settings.Health Checks
Health checks allow Docker to track service readiness and restart containers that become unresponsive. Add ahealthcheck block to any service:
Jenkins — uses curl to poll the root HTTP endpoint:
wget to query the /api/system/status endpoint:
start_period gives each service a grace period before health check failures count as restarts. SonarQube requires a longer start period because it runs database migrations on first launch.
A ready-to-use template containing resource limits, health checks, pinned
image versions, and JVM tuning for all services is provided at
docker-compose.override.yml.example. See
Docker Compose Override for the full
production hardening workflow.