Module Description
SAAS Website Plans - Docker Extension. Adds Docker image configuration to website subscription plans, enabling plan purchases to be deployed as Docker containers.
Dependencies
sadeem_subscription_websitesadeem_saas_docker
Extension
This module extends website subscription plans with a Docker Image field and adds a workers add-on type. When the subscription type is set to docker, the system uses the Docker image to auto-select the best Portainer environment and deploy a container.
Additional Plan Fields
- Subscription Type - Extended with
Dockeroption - Docker Image - Portainer image for subscriptions (required when type is
docker)
Additional Add-on Type
- Workers - New add-on type for configuring Docker worker count
How It Works
- Plan is configured with type
Dockerand a Docker image - Optionally add a
workersadd-on to allow customers to configure worker count - Customer purchases the plan through the website flow
- After payment,
get_best_environment()selects the optimal Portainer environment - Worker count is mapped from the
workersadd-on quantity - All environment-related fields (IP, ports, domain, Cloudflare, Nginx) are set from the environment
- Subscription is created and a Docker stack is deployed in Portainer
Publishing Validation
When publishing a Docker plan, the system validates that a Docker Image is configured.