How to enable Reseller feature

Installing Fleio from scratch

In order to enable the reseller feature you must set the billing.reseller feature to True in settings.py file. This feature is listed in the STAFF_FEATURES dictionary.

The next step would be to uncomment the following block in /etc/nginx/sites-enabled/your-site.conf if you’re using Ubuntu or in /etc/nginx/conf.d/your-site.conf if you’re using CentOS.

location /reseller {
     root /var/webapps/fleio/frontend/site/;
     expires -1;
     try_files $uri $uri/ /reseller/index.html;
 }

The last step is to restart Fleio services (see Restarting Fleio) and to reload the nginx service:

service nginx reload

Updating Fleio from 2019.10.0 or lower

In order to enable the reseller feature you must set the billing.reseller feature to True in settings.py file. This feature is listed in the STAFF_FEATURES dictionary.

The next step would be to add the following block in /etc/nginx/sites-enabled/your-site.conf if you’re using Ubuntu or in /etc/nginx/conf.d/your-site.conf if you’re using CentOS, above the location /staff declaration.

location /reseller {
     root /var/webapps/fleio/frontend/site/;
     expires -1;
     try_files $uri $uri/ /reseller/index.html;
 }

After that we need to run the following commands:

cp /var/webapps/fleio/frontend/site/reseller/assets/config/app-template.config.json /var/webapps/fleio/frontend/site/reseller/assets/config/app.config.json
cp /var/webapps/fleio/frontend/site/reseller/assets/config/reseller-template.config.json /var/webapps/fleio/frontend/site/reseller/assets/config/reseller.config.json
sed 's|"backendApiUrl": "//localhost:8000/resellerapi|"backendApiUrl": "//REPLACE-ME/backend/resellerapi|' -i /var/webapps/fleio/frontend/site/reseller/assets/config/reseller.config.json
sed 's|<base href="/">|<base href="/reseller/">|' -i  /var/webapps/fleio/frontend/site/reseller/index.html

Please replace “REPLACE-ME” with your domain configured at bootstrapping.

The last step is to restart Fleio services (see Restarting Fleio) and to reload the nginx service:

service nginx reload