Deploy python flask app on Cpanel shared hosting

Published: 08 August 2020
on channel: Bappy Tech Tips
58,194
697

In this video, we will see,
How we can deploy Web application written in Python flask framework on a Cpanel shared hosting.

Hosting provider: https://www.cubicbits.com/web-hosting/

Tutorial + Source Code: https://github.com/ohidurbappy/python...


Step 1:
Click the "Setup Python App" icon.


Step 2:
Press the "Create Application" button.

Step 3:
- Choose the Python version you wish to use.
- Enter the directory that the Python application should be installed in. This path is relative to the root directory of the web hotel and will create the specified directory if it does not exist.
- Enter the address the application should be located. If it should be accessible directly on your domain, leave the field blank.
- Enter the name of the file to run. This must link the "Application Entry Point" (see point 5) with the application itself.
- For example, assuming that this example runs a Flask server, this can be done by defining "app = Flask (__ name__)" in the specified file.
- Enter the name of the variable containing the server.
- This is the path to where the Phusion Passenger log file is written.
- Here environment variables can be added for Python installation if needed.
- When all fields are filled in as desired, press the "Create" button to set up the application.


Step 4:
You can now make changes and manage the Python application.

- This is the command you input in the terminal to enter the virtual environment that is set up for the application. To install packages through pip, this command must be run first.
- These buttons allow you to start, stop, and restart the application.
- If you have added a configuration file (ref. Point 4), for example, a "requirements.txt" made with pip, you can install the listed packages by pressing this button.
- Here you can add configuration files for the Python application.
- Here you can run a Python script located on Webhosting. This is useful if you do not have access to the terminal and want to run a Python script to do setup, for example, to create a superuser in Django. The script is run in the virtual environment of the application.
- These buttons allow you to save or discard changes as well as delete the entire application.


💻 Source code:
https://github.com/ohidurbappy/python...

🌎 Website: https://www.ohidur.com

☕ Support me: https://www.buymeacoffee.com/ohidurbappy

Hire me
💰 Fiver: https://www.fiverr.com/ohidurbappy

🔗 Social Media 🔗
📝 LinkedIn:   / ohidurbappy  
📂 GitHub: https://github.com/ohidurbappy
📸 Instagram:   / ohidurbappy  
📱 Twitter:   / ohidurbappy  
https://bappytechtips.blogspot.com/

⭐️ Tags ⭐️
- Flask, Python

⭐️ Hashtags ⭐️
#python, #flask, #hosting, #cpanel, #shared_hosting, #python_flask


Watch video Deploy python flask app on Cpanel shared hosting online without registration, duration hours minute second in high quality. This video was added by user Bappy Tech Tips 08 August 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 58,194 once and liked it 697 people.