filmov
tv
How to Deploy a Flask App to a Linux Server
Показать описание
This video will show you how to deploy your flask app to a headless linux server that is running ubuntu. We will be using apache and wsgi to do so.
Thanks to Linode for sponsoring this video! Deploy your linux server by clicking the link or using the promo code TWT19 for $20 free credit!
Download Links:
Credits:
**Procedure (refer to video for missing details)**
Step 1: Setup a server on linode
Step 2: Download Putty and SSH in
Step 3: Download and Install Apache
- sudo apt update
- sudo apt install apache2
- apache2 -version
Step 4: Configure Firewall
- sudo ufw app list
- sudo ufw allow ‘Apache’
Step 5: Configure apache
- sudo systemctl status apache 2
Step 6: Install and enable mod_wsgi
- sudo apt-get install libapache2-mod-wsgi python-dev
Step 7: Creating flask app
- cd /var/www
- sudo mkdir webApp
- cd webApp
Step 8: Install flask
- sudo apt-get install python-pip
- sudo pip install Flask
- sudo pip install flask_sqlalchemy
Step 9: Use winSCP to transfer python files to server
Step 10: configure and enable virtual host
- sudo a2ensite webApp
- systemctl reload apache2
Step 11: Create .wsgi file
Place the below code in the wsgi file
#!/usr/bin/python
import sys
import logging
from webApp import app as application
Step 12: Restart apache
- sudo service apache2 restart
Step 13: Visit the ip address of your server in the browser to access your website!
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
Tags:
- Tech With Tim
- How to deploy a flask app to linux
- Deploy flask app
- Flask App Deploy
- Deploy flask app to ubuntu server
#Python #Flask #Linux
Thanks to Linode for sponsoring this video! Deploy your linux server by clicking the link or using the promo code TWT19 for $20 free credit!
Download Links:
Credits:
**Procedure (refer to video for missing details)**
Step 1: Setup a server on linode
Step 2: Download Putty and SSH in
Step 3: Download and Install Apache
- sudo apt update
- sudo apt install apache2
- apache2 -version
Step 4: Configure Firewall
- sudo ufw app list
- sudo ufw allow ‘Apache’
Step 5: Configure apache
- sudo systemctl status apache 2
Step 6: Install and enable mod_wsgi
- sudo apt-get install libapache2-mod-wsgi python-dev
Step 7: Creating flask app
- cd /var/www
- sudo mkdir webApp
- cd webApp
Step 8: Install flask
- sudo apt-get install python-pip
- sudo pip install Flask
- sudo pip install flask_sqlalchemy
Step 9: Use winSCP to transfer python files to server
Step 10: configure and enable virtual host
- sudo a2ensite webApp
- systemctl reload apache2
Step 11: Create .wsgi file
Place the below code in the wsgi file
#!/usr/bin/python
import sys
import logging
from webApp import app as application
Step 12: Restart apache
- sudo service apache2 restart
Step 13: Visit the ip address of your server in the browser to access your website!
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
Tags:
- Tech With Tim
- How to deploy a flask app to linux
- Deploy flask app
- Flask App Deploy
- Deploy flask app to ubuntu server
#Python #Flask #Linux
Комментарии