Skip to content

Module Description

SAAS Subscription Trial - Docker Extension. Adds Docker image configuration to trial packages, enabling trial subscriptions to be deployed as Docker containers.

Dependencies

  • sadeem_subscription_trial
  • sadeem_saas_docker

Extension

This module extends the trial package with Docker-specific fields. When the subscription type is set to docker, the trial system uses the Docker image to auto-select the best Portainer environment and deploy a container.

Additional Trial Package Fields

  1. Subscription Type - Extended with Docker option
  2. Docker Image - Portainer image for trial subscriptions (required when type is docker)
  3. Docker Worker Count - Number of Odoo workers (default: 0 = threaded mode)
  4. Without Demo - Create database without demo data (default: True)
  5. Limit Time CPU - Max CPU time per request in seconds (default: 60)
  6. Limit Time Real - Max real time per request in seconds (default: 120)

How It Works

  1. Trial package is configured with type Docker and a Docker image
  2. Customer submits trial form
  3. System creates trial request and subscription
  4. The Docker image's get_best_environment() selects the optimal Portainer environment
  5. All environment-related fields (IP, ports, domain, Cloudflare, Nginx) are auto-populated
  6. Subscription is confirmed and a Docker stack is created in Portainer