Skip to main content

Deploy SandBox Python Apps

How to deploy Python apps on Eenos?

This document will help you deploy a Python app on your eenos hosting control panel.  Eenos control panel is a modern hosting control panel designed for modern apps. 

Features Of Eenos Python App Management

Eenso control panel has the following wonderful features for managing Python apps easily.

  • Manage unlimited Python app domains or subdomains
  • Python Version Selector 
  • Deploy Django  with one click
  • Deploy Wagtail with one click
  • Deploy Flask app
  • Deploy any Python uWsgi app

Every Eenos Python app has its own virtual environment.  So, migration and transfer of hosting accounts are easy.

To start deploying Python app logins to your eenos control panel, go to the following Page:

Python -> Python SandBox Apps

Setup Python SandBox and Install Apps

Now you need to fill out the simple form  as follows,

Choose Domain For Python App: Select a domain or subdomain for deploying a Python app. This is the website url you are going to deploy the app.

Choose Python Version: Select a suitable version of Python distribution to set the Sandbox virtual environment,

Choose Python App: Select what type of Python app are you hosting.   Based on this selection, you may need to configure the app-specific settings also.

App Startup Script: The startup entry script name. It is normally a wsgi script  ( eg: wsgi.py ) 

Public Folder Name: This is the folder into which you upload the static files like CSS, js, images, etc. It is directly under your website document root.

Project Publicity Type: This option will help you to set up the project in either production or development mode.

Install Demo App: This will help you to install the selected demo app.  If you have already developed the app, you can select the option no and upload the files yourself.

Now, Click the button  Deploy App and it will start deploying the app.

Manage Python App From Shell

If your hosting account has enabled SSH access, you can easily manage your Python app from the shell too. You may contact your hosting server and enable the ssh shell access to access this feature. 

You can login to the server with the ssh client from your desktop.

Here, we are going to use the following details to show you how to manage Python apps from the eenos sever shell virtual environment. 

 Example eenso user:  myuser

Example python  app domain: django.mydomain.com

Example  eenos ssh server port: 22

Login to the SSH terminal

Login to the SSH server with the following command,

ssh myuser@django.mydomain.com -p 22

Activate Python  Virtual Environment

Activate the Virtual Sandbox  Python environment for the domain django.mydomain.com as follows,

myuser:$ ~ $ source  ~/.sandbox/python/django.mydomain.com/bin/activate
(django.mydomain.com) myuser:$ ~ $

Done! You are on the domain's Python environment and you can start working on your Python app from the terminal. 

See, the usage of some example commands below,

Check the Python version for the domain,

(django.mydomain.com) myuser@:$ ~ $ python -V
Python 3.8.12
(django.mydomain.com) myuser@:$ ~ $ 

Run the PIP command on the domain as follows,

(django.mydomain.com) myuser@:$ ~ $ pip list
Package             Version
------------------- ---------
anyascii            0.3.0
asgiref             3.5.0
backports.zoneinfo  0.2.1
beautifulsoup4      4.9.3
certifi             2021.10.8
charset-normalizer  2.0.12
click               8.0.4
Django              4.0.3
django-filter       21.1
django-modelcluster 5.2
django-taggit       2.1.0
django-treebeard    4.5.1
djangorestframework 3.13.1
draftjs-exporter    2.1.7
et-xmlfile          1.1.0
Flask               2.0.3
html5lib            1.1
idna                3.3
itsdangerous        2.1.1
Jinja2              3.0.3
l18n                2021.3
MarkupSafe          2.1.0
mysqlclient         2.1.0
openpyxl            3.0.9
Pillow              9.0.1
pip                 21.3.1
psycopg             3.0.9
psycopg2            2.9.3
pymongo             4.0.2
pytz                2021.3
requests            2.27.1
setuptools          58.3.0
six                 1.16.0
soupsieve           2.3.1
sqlparse            0.4.2
tablib              3.2.0
telepath            0.2
urllib3             1.26.8
uWSGI               2.0.20
wagtail             2.16.1
webencodings        0.5.1
Werkzeug            2.0.3
wheel               0.37.0
Willow              1.4.1
xlrd                2.0.1
XlsxWriter          3.0.3
xlwt                1.3.0
(django.mydomain.com) myuser@:$ ~ $ 

Deactivate the Python Virtual Environment

You can deactivate the current working Python shell virtual environment using the following command

(django.mydomain.com) myuser@:$ ~ $ deactivate 
myuser@:$ ~ $ 

This command will return you to the default terminal. Now you can switch to another Python app from the same terminal.

Switch Python SandBox Virtual Environment

If we have the Flask app on the  domain flask.mydomain.com on the same eenos hosting account, we can switch to the virtual environment for the Flask app as follows,

myuser:$ ~ $ source  ~/.sandbox/python/flask.mydomain.com/bin/activate
(flask.mydomain.com) myuser:$ ~ $

With the above steps, you can start deploying Python apps.  The next session will help you to manage Python pip modules from the eenos control panel.