Skip to content

Module Management

Strawly modules are optional microservices that add functionality on top of the core platform. You can enable or disable them at any time without affecting the core services.

How modules work

Each module:

  • Is a separate Docker image pulled from the Codeberg Container Registry
  • Is toggled on or off in strawly-deployment.yml
  • Shares the PostgreSQL database with the backend, scoped by a provider field
  • Runs scheduled scans automatically and exposes a manual trigger via REST API
  • Registers itself in the Strawly module registry so the frontend can display it

Available modules

Module Description Port
optimizations-azure Azure cost optimisation scanner 3002

Enable a module

  1. Open strawly-deployment.yml and set the module to enabled: true:

    yaml modules: optimizations-azure: enabled: true

  2. Add the required credentials to .env (see Environment Variables for each module's variables).

  3. Regenerate the compose file and redeploy:

    bash npm run generate-compose docker compose -f docker-compose.generated.yml pull docker compose -f docker-compose.generated.yml up -d

Disable a module

  1. Open strawly-deployment.yml and set the module to enabled: false:

    yaml modules: optimizations-azure: enabled: false

  2. Regenerate and redeploy with --remove-orphans to stop and remove the module container:

    bash npm run generate-compose docker compose -f docker-compose.generated.yml up -d --remove-orphans

The module's data in the database is not deleted when you disable a module. Re-enabling it later will continue from where it left off.

Change a module's scan schedule

The scan schedule is set per-module in strawly-deployment.yml using a standard cron expression:

modules:
  optimizations-azure:
    schedule:
      cron: "0 6 * * *"   # run at 6 AM UTC instead of 3 AM
      timezone: "UTC"

After editing, regenerate and redeploy:

npm run generate-compose
docker compose -f docker-compose.generated.yml up -d

You can also trigger a scan immediately from the Settings page in the Strawly UI, or via the module's REST API:

curl -X POST http://localhost:3002/opportunities/scan

Verify a module is running

# Check container status
docker compose -f docker-compose.generated.yml ps

# Check module health
curl http://localhost:3002/health

# View module logs
docker compose -f docker-compose.generated.yml logs -f optimizations-azure