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: Schema Initialization

The application does not create database tables automatically. You must initialize the schema before starting app-prometheus for the first time. See Database Schema Initialization below.

First Deployment: Bootstrap

If this is a brand-new environment, the system needs initial data (SYSTEM institution, portal, admin account). Set the SLAUNCHX_BOOTSTRAP_CONFIG_PATH environment variable to point to a bootstrap JSON file:

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 SLAUNCHX_BOOTSTRAP_CONFIG_PATH=/config/bootstrap.json \
  -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 SLAUNCHX_BOOTSTRAP_CONFIG_PATH variable. Bootstrap is ignored on subsequent starts if the SYSTEM 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:28080:28080 \
  --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:28080/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

Database Schema Initialization

The platform schema is managed as individual SQL files — one per table — organized by business category.

Schema source of truth: slaunchx-app-prometheus/docs/runbooks/database/schema/

First Deployment

After middleware is running, initialize the schema before starting application services:

bash
# Initialize schema from SSoT (47 tables across 13 categories)
bash slaunchx-app-prometheus/docs/runbooks/database/scripts/db-init.sh \
  --host 127.0.0.1 \
  --port {DB_PORT} \
  --database slaunchx \
  --user {DB_USERNAME} \
  --password {DB_PASSWORD} \
  --schema-dir slaunchx-app-prometheus/docs/runbooks/database/schema

# Verify table count
mysql -h 127.0.0.1 -P {DB_PORT} -u {DB_USERNAME} -p{DB_PASSWORD} \
  -e "SELECT COUNT(*) AS tables FROM information_schema.tables WHERE table_schema = 'slaunchx';"
# Expected: ~48 tables

Schema Updates

Schema changes are tracked as individual .sql files. Each file uses CREATE TABLE IF NOT EXISTS, making re-runs safe:

bash
# Re-run db-init.sh after pulling new schema files
bash slaunchx-app-prometheus/docs/runbooks/database/scripts/db-init.sh \
  --host ... --port ... --database ... --user ... --password ... --schema-dir ...

For column-level changes (ALTER TABLE), migration scripts are in docs/runbooks/database/migrations/.

Bootstrap (First Run Only)

On first startup, app-prometheus runs the bootstrap process if SLAUNCHX_BOOTSTRAP_CONFIG_PATH is set:

  • Creates the initial SYSTEM institution
  • Creates the SYSTEM portal with an access code
  • Creates the SYSTEM admin account
  • Configures email notification channel
  • Syncs permission definitions

v2.1.0: Permission codes are now auto-provisioned during bootstrap (additive-only — the system creates missing permission codes but never removes existing ones). Admin security config and Email MFA are also auto-configured. No manual permission setup is required after bootstrap.

Other portals (TENANT, PARTNER, CONSUMER) are created via SYSTEM admin API after bootstrap.

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
  • [ ] Database schema initialized via db-init.sh (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