Build and Registry
This chapter covers building the Java application, creating Docker images, and setting up the private registry.
Maven Build
Build All Modules
bash
export ATLAS_ROOT=/path/to/slaunchx-backend-platform
cd $ATLAS_ROOT
mvn package -DskipTestsThis produces JAR files in each module's target/ directory.
Build a Single Module
bash
# Build app-prometheus and its dependencies only
mvn package -DskipTests -am -pl slaunchx-app-prometheusThe -am flag builds required upstream modules automatically.
Module List
| Module | Type | JAR Location |
|---|---|---|
| slaunchx-app-prometheus | Runnable | slaunchx-app-prometheus/target/*.jar |
| slaunchx-support-email | Runnable | slaunchx-support-email/target/*.jar |
| slaunchx-support-file | Runnable | slaunchx-support-file/target/*.jar |
| slaunchx-support-schedule | Runnable | slaunchx-support-schedule/target/*.jar |
| slaunchx-partner-slash | Runnable | slaunchx-partner-slash/target/*.jar |
| slaunchx-partner-stripe | Runnable | slaunchx-partner-stripe/target/*.jar |
| slaunchx-support-tron-wallet | Runnable | slaunchx-support-tron-wallet/target/*.jar |
| slaunchx-support-solana-wallet | Runnable | slaunchx-support-solana-wallet/target/*.jar |
Other modules (sdk-, common-) are libraries — they produce JARs but no Docker images.
Docker Image Build
Dockerfile Location
Each runnable module has a Dockerfile at:
deploy/docker/Dockerfile.{module-short-name}Example: deploy/docker/Dockerfile.app-prometheus
Build an Image
bash
cd $ATLAS_ROOT
# Build app-prometheus image
docker build \
-f deploy/docker/Dockerfile.app-prometheus \
-t slaunchx/app-prometheus:dev-latest \
.Using the Build Script
The repo includes a helper script that combines Maven build + Docker image:
bash
# Build all modules (Maven + Docker)
ci/local/build.sh
# Build single module
ci/local/build.sh app-prometheus
# Maven only (skip Docker image)
ci/local/build.sh app-prometheus --maven-onlyPrivate Docker Registry
For deployment to remote hosts, push images to a private registry.
Start Registry
bash
docker run -d \
--name slaunchx-registry \
--network slaunchx-intra \
-p 127.0.0.1:5000:5000 \
-v /home/registry/data:/var/lib/registry \
-e REGISTRY_AUTH=htpasswd \
-e REGISTRY_AUTH_HTPASSWD_REALM="SlaunchX Registry" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
-v /home/registry/auth:/auth \
--restart unless-stopped \
registry:2Create Registry Credentials
bash
mkdir -p /home/registry/auth
docker run --rm --entrypoint htpasswd \
httpd:2 -Bbn <username> <password> > /home/registry/auth/htpasswdPush Images
bash
# Login
docker login localhost:5000
# Tag and push
docker tag slaunchx/app-prometheus:dev-latest \
localhost:5000/slaunchx/app-prometheus:dev-latest
docker push localhost:5000/slaunchx/app-prometheus:dev-latestImage Tagging Convention
| Tag | Meaning |
|---|---|
dev-latest | Latest build from dev branch |
dev-{YYYYMMDD}-{HHMMSS} | Timestamped build (e.g. dev-20260314-091500) |
Registry Cleanup
Old images accumulate. Run garbage collection periodically:
bash
# Delete old tags (keep latest + 4 most recent per module)
# Then run GC
docker exec slaunchx-registry bin/registry garbage-collect \
/etc/docker/registry/config.yml --delete-untaggedBuild Checklist
- [ ] Maven build succeeds with no errors
- [ ] Docker images created for all needed modules
- [ ] Private registry running (if deploying to remote host)
- [ ] Images pushed to registry