Skip to content

Deploy Services

Start application containers in dependency order. Middleware must be running before this step — see Middleware Setup.

Deployment Order

Deploy in this order (dependencies flow top-to-bottom):

1. app-prometheus          ← core service, deploy first
2. support-email           ← email sending
3. support-file            ← file storage
4. support-schedule        ← background tasks
5. partner-slash           ← (optional) Slash integration
6. partner-stripe          ← (optional) Stripe integration
7. support-tron-wallet     ← (optional) TRON blockchain
8. support-solana-wallet   ← (optional) Solana blockchain

Services 5-8 are optional — deploy only what you need.

1. app-prometheus (Core Service)

This is the main API gateway and business logic service. All other services depend on it indirectly.

bash
docker run -d \
  --name slaunchx-app-prometheus-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18020:18020 \
  --env-file /opt/slaunchx/config/app-prometheus/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/app-prometheus:dev-latest

First Deployment: Database Migration

On first startup, Flyway automatically:

  1. Creates all tables from the baseline migration
  2. Validates the schema matches expected state

Watch the logs for migration progress:

bash
docker logs -f slaunchx-app-prometheus-test 2>&1 | grep -i flyway
# Expected: "Successfully applied X migrations"

First Deployment: Bootstrap

If this is a brand-new environment, the system needs initial data (institution, portal config, admin account):

bash
docker run -d \
  --name slaunchx-app-prometheus-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18020:18020 \
  --env-file /opt/slaunchx/config/app-prometheus/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  -e SYSTEM_BOOTSTRAP_CONFIG=/config/bootstrap.json \
  -e SLAUNCHX_BOOTSTRAP_ADMIN_PASSWORD=initial-admin-password \
  -v /opt/slaunchx/config/bootstrap.json:/config/bootstrap.json:ro \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/app-prometheus:dev-latest

TIP

After the first successful startup, remove the bootstrap variables. They are ignored on subsequent starts if the institution already exists.

Verify

bash
curl -s http://localhost:18020/prometheus/actuator/health
# Expected: {"status":"UP"}

2. support-email

bash
docker run -d \
  --name slaunchx-support-email-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18030:18030 \
  --env-file /opt/slaunchx/config/support-email/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/support-email:dev-latest

Verify:

bash
curl -s http://localhost:18030/email-service/actuator/health

3. support-file

bash
docker run -d \
  --name slaunchx-support-file-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18040:18040 \
  --env-file /opt/slaunchx/config/support-file/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/support-file:dev-latest

Verify:

bash
curl -s http://localhost:18040/file-service/actuator/health

4. support-schedule

bash
docker run -d \
  --name slaunchx-support-schedule-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18050:18050 \
  --env-file /opt/slaunchx/config/support-schedule/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/support-schedule:dev-latest

Verify:

bash
curl -s http://localhost:18050/schedule/actuator/health

5. partner-slash (Optional)

bash
docker run -d \
  --name slaunchx-partner-slash-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18080:18080 \
  --env-file /opt/slaunchx/config/partner-slash/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/partner-slash:dev-latest

Verify:

bash
curl -s http://localhost:18080/partner/channel/slash/actuator/health

6. partner-stripe (Optional)

bash
docker run -d \
  --name slaunchx-partner-stripe-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18090:18090 \
  --env-file /opt/slaunchx/config/partner-stripe/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/partner-stripe:dev-latest

Verify:

bash
curl -s http://localhost:18090/partner/channel/stripe/actuator/health

7. support-tron-wallet (Optional)

bash
docker run -d \
  --name slaunchx-support-tron-wallet-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18060:18060 \
  --env-file /opt/slaunchx/config/support-tron-wallet/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  -v tron-wallet-test-data:/data \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/support-tron-wallet:dev-latest

Verify:

bash
curl -s http://localhost:18060/actuator/health

Volume Mount

Wallet services store key material locally. The -v volume mount is critical — losing this volume means losing wallet keys.

8. support-solana-wallet (Optional)

bash
docker run -d \
  --name slaunchx-support-solana-wallet-test \
  --network slaunchx-intra \
  -p 0.0.0.0:18070:18070 \
  --env-file /opt/slaunchx/config/support-solana-wallet/test.env \
  -e SPRING_PROFILES_ACTIVE=test \
  -v solana-wallet-test-data:/data \
  --log-opt max-size=50m --log-opt max-file=3 \
  --restart unless-stopped \
  localhost:5000/slaunchx/support-solana-wallet:dev-latest

Verify:

bash
curl -s http://localhost:18070/actuator/health

Using the Deploy Script

For convenience, the repository includes a deploy script that handles stop/rm/pull/run:

bash
# Deploy all modules to test
ci/local/deploy.sh test

# Deploy single module
ci/local/deploy.sh test app-prometheus

# Deploy with a specific image tag
ci/local/deploy.sh test app-prometheus --tag dev-20260314-091500

# Preview commands without executing
ci/local/deploy.sh test --dry-run

Container Naming Convention

slaunchx-{module}-{environment}

Examples:

  • slaunchx-app-prometheus-test
  • slaunchx-support-email-alpha
  • slaunchx-mysql-test

Deployment Checklist

  • [ ] All middleware containers running and verified
  • [ ] app-prometheus started and health check returns UP
  • [ ] Flyway migrations completed successfully (first deployment)
  • [ ] Bootstrap data created (first deployment)
  • [ ] All required optional services started
  • [ ] All containers using --restart unless-stopped
  • [ ] Log rotation configured (max-size=50m, max-file=3)

Internal Handbook