Skip to main content

Deploy SandBox Python Apps

How to deploy Python apps on eenos ?Eenos?

This document will help you to deploy a pythonPython 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 havehas the following wonderful features for managing pythonPython apps easily.

  • Manage unlimited pythonPython 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 eenosEenos python Python app havehas its onown virtual environment.  So, migration and transfer of  hosting accounts are easy.

To start deploying pythonPython 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 pythonPython app. This  is the website  url you are going to deploy the app.

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

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

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

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

Project Publicity Type : This option will help you  to setupset 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.

MangeManage Python App From Shell

If your hosting account havehas enabled sshSSH access, you can easily manage your pythonPython 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 appapps from the eenos sever shell virtual environment. 

 Example eenso user :user:  myuser

Example python  app domain :domain: django.mydomain.com

Example  eenos ssh severserver port  :port: 22

Login to the SSH terminal

Login to the sshSSH severserver with the following command ,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 domainsdomain's pythonPython environment and  you can start working on your pythonPython app from the terminal. 

See, the usage of some example commands below,

Check pythonthe 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 pythonPython shell virtual environment useusing the following command

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

This command will return youryou to the default terminal. Now you can switch to another pythonPython 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 flaskFlask app as follows,

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

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