Python Flask Tutorial: Deploying Your Application (Option #1) - Deploy to a Linux Server

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 661

  • @coreyms
    @coreyms  5 ปีที่แล้ว +100

    In this video, we set up a Linux server from scratch before we deploy Flask, which is what a lot of people have requested. But if you already have a server ready to go then you might not be interested in the setup part. If you'd like to skip the Linux server setup and go straight to the deployment then please skip to 26:48
    I hope people find this useful. Deployment can be a tricky topic because there are so many different choices (e.g. hosts, operating systems, web servers, etc). These are my preferred choices in this video. Remember, if you'd like to sign up for $20 of credit at Linode then you can use my link to signup: linode.com/coreyschafer

    • @derricknjoroge2494
      @derricknjoroge2494 5 ปีที่แล้ว +6

      Hi Corey, kindly do a video on Flask Restful. Thank you for your tutorials. You reaally helping alot of aspiring developers especially in Africa.

    • @YunikMaharjan
      @YunikMaharjan 5 ปีที่แล้ว

      please do a full-on video series on asynchronous programming in python. Thanks

    • @gardnmi
      @gardnmi 5 ปีที่แล้ว +1

      Hey Corey,
      I added a text editor to make the blog a bit more functional. You can check out the repo linked below.
      github.com/gardnmi/flask_blog_editor
      The first blog post explains how to use. To log in the use admin@admin.com and admin for the password.
      Thanks for the tutorial!

    • @MMABeijing
      @MMABeijing 5 ปีที่แล้ว

      Hello Corey. I have used your github code, followed your instructions on a 18.04 LTS ubuntu, and when i tried to "run flask" i am getting the error message "Error: Could not import "run"."
      any idea what it could be?

    • @chrisribia
      @chrisribia 5 ปีที่แล้ว +2

      @@derricknjoroge2494 yeah loving this from africa kenya

  • @lightninginmyhands4878
    @lightninginmyhands4878 5 ปีที่แล้ว +261

    == TIME STAMPS of CODE and COMMANDS==
    29:41 - `pip freeze > requirements.txt` - and move the text into Flask_Blog folder
    30:35 - `scp -r Desktop/Flask_Blog coreyms@45.33.123.214:~/` - where we copy Flask_Blog from personal machine to
    Linode
    31:50 - `sudo apt install python3-pip`
    32:12 - `sudo apt install python3-venv`
    32:44 - `python3 -m venv Flask_Blog/venv`
    33:19 - `source venv/bin/activate` - in our Flask_Blog dir we activate our venv
    33:50 - `pip install -r requirements.txt` - we install our pip packages into our venv
    37:40 - `sudo touch /etc/config.json` &
    `sudo nano /etc/config.json` - where we now store our environment variables inside a file instead of the system
    40:22 - `sudo nano flaskblog/config.py` - *add* the following code
    `import json`
    `with open('/etc/config.json') as config_file:
    config = json.load(config_file)`
    41:50 - we are still in config.py and *replace* `os.environ.get` with `config.get`
    43:35 - `export FLASK_APP=run.py` - where we assign the environment variable FLASK_APP to the module
    43:55 - `flask run --host=0.0.0.0` - we run a local dev server on the linode
    48:26 - `sudo apt install nginx`
    48:53 - `pip install gunicorn`
    50:02 - `sudo rm /etc/nginx/sites-enabled/default` - we remove nginx default config
    50:20 - `sudo nano /etc/nginx/sites-enabled/flaskblog` - new nginx config solely for our app. Add the code from Corey's snippets. Remember: gunicorn is running on port 8000, nginx is running on port 80
    54:27 - `sudo nano ufw allow http/tcp` &
    `sudo ufw delete allow 5000` &
    `sudo ufw enable`
    55:00 - `sudo systemctl restart nginx` - restart nginx server
    56:25 - access your URL/static/main.css. This proves that nginx server is serving static content and that it cannot serve the dynamic content because Gunicorn is not running yet.
    58:02 - `nproc --all` - to find out how many cores on this machine
    58:35 - `gunicorn -w 3 run:app` - now that gunicorn is running, we access our main site and this proves that nginx is passing HTTP requests to gunicorn
    1:00:23 - `sudo apt install supervisor` - this software (written in python!) will run Gunicorn in the background
    1:00:50 - `sudo nano /etc/supervisor/conf.d/flaskblog.conf` - create a supervisor config file referring to flaskblog package, and Gunicorn. Add corey's snippets
    1:04:10 - note that we point supervisor to (yet uncreated) log files located:
    `/var/log/flaskblog/flaskblog.err.log` &
    `/var/log/flaskblog/flaskblog.out.log`
    1:05:03 - `sudo mkdir -p /var/log/flaskblog`
    1:05:22 - `sudo touch /var/log/flaskblog/flaskblog.err.log` &
    `sudo touch /var/log/flaskblog/flaskblog.out.log` - where we now create our log files
    1:05:42 - `sudo supervisorctl reload` - where we restart supervisor
    1:07:40 - `sudo nano /etc/nginx/nginx.conf` - where we access general config file for nginx
    1:07:54 - `client_max_body_size 5M;` - add this code in the config file to increase upload limit from 2MB to 5MB
    1:08:30 - `sudo systemctl restart nginx`
    Your site is now in production! :D

    • @coreyms
      @coreyms  5 ปีที่แล้ว +20

      Thanks!

    • @lightninginmyhands4878
      @lightninginmyhands4878 5 ปีที่แล้ว +9

      @@coreyms thank you! I made this because I ended up making changes to my package and wanted to remember a) what we added that is not in my personal computer's package and b) all the ubuntu commands (my first time deploying to linux)

    • @MMABeijing
      @MMABeijing 5 ปีที่แล้ว +1

      thank you soooo much. I was copying all those commands but lost them because of an unexpected reboot. I can not believe you recorded and share them here, thanks again

    • @Byomakesh1
      @Byomakesh1 4 ปีที่แล้ว +1

      @@lightninginmyhands4878 bro... actually am using Gmail to send mails but when i am trying to reset password it just keeps on loading & after a few minutes its showing 502 nginc error !! can you please belp me out

    • @kushalgupta9613
      @kushalgupta9613 4 ปีที่แล้ว +1

      @@Byomakesh1 Hey, did you find any solution?

  • @zuman_one
    @zuman_one 5 ปีที่แล้ว +67

    Request: Please create a video on migrating the DB to PostgreSQL. In the initial videos of this series, you mentioned that you will show how to use Postgres. Eagerly waiting for this :D

    • @rairorr
      @rairorr 4 ปีที่แล้ว +2

      @@emiliolezama9694 medium.com/@dushan14/create-a-web-application-with-python-flask-postgresql-and-deploy-on-heroku-243d548335cc this helped me

    • @junhuama68
      @junhuama68 3 หลายเดือนก่อน

      Seriously Corey. Still waiting.

  • @Hassan2323
    @Hassan2323 4 ปีที่แล้ว +24

    I don’t understand why some people put dislike on such Video, very informative very clear video ... I learned a lot ... thanks

    • @jadavis84
      @jadavis84 4 ปีที่แล้ว +1

      When I was younger (like 12 or 13) I would often get mad at the person putting the help out into the world when it was really just that I didn't understand something. Some of this is hard for people without a point of reference to wrap their heads around so I'd imagine some of those downvotes are either bots trying to seem like genuine accounts or are people doing that.

  • @abhisheksaharan
    @abhisheksaharan 5 ปีที่แล้ว +47

    server config, ngnix configuration, ssh configuration supervisor config all in one place. This is incredible stuff. A very thorough and detailed explanation. Thank you so much for putting the time to create this tutorial. Also if possible please create the video for including SSL certificate, I have been following flask series and this series now have everything for zero till deploying. It would be great not to leave the ssl part too.

    • @mohamedaminebenbouali2941
      @mohamedaminebenbouali2941 2 ปีที่แล้ว

      for anyone wanting to selfsign ssl and then connect it to a trusted ssl, i have found these two tutorials useful which u must apply both for a result
      www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-on-centos-7
      th-cam.com/video/PzIgHz5r-h0/w-d-xo.html&ab_channel=RANAsVFX

  • @lightninginmyhands4878
    @lightninginmyhands4878 5 ปีที่แล้ว +21

    I think it's important to make the following distinctions after we switch from using Flask's local dev server to web-facing NGINX/Gunicorn structure:
    Our Flask app is a *WSGI app* . It generates dynamic content (ex: user posts, user names). The way it can do this is by accessing the database (i.e. using SQLAlchemy).
    Gunicorn is a *WSGI server* which launches the WSGI app. In this video, Gunicorn is also a manager of 3 workers which each launches one instance of the WSGI app.
    NGINX is a *web server* which generates static content (ex: navigation bar, page name). This also delivers HTTP requests to Gunicorn.

  • @TheThunder48
    @TheThunder48 3 ปีที่แล้ว +41

    2021 Tip: If you are having problem with NGINX try to open the main config file by nano /etc/nginx/nginx.conf and changei user on top from www-data to you actual username. I had problems because NGINX could not access the static files due to not having permission.

    • @jonbrenner565
      @jonbrenner565 2 ปีที่แล้ว +2

      Dude, you're amazing for figuring this out - I had no idea where to begin. Thank you so much!

    • @sayhellotoroy
      @sayhellotoroy ปีที่แล้ว +1

      Thanks. That was easy fix :) worked in 10.2022

    • @mehdi-dc3oi
      @mehdi-dc3oi ปีที่แล้ว

      Oh man THANKS, youre amazing, worked in 10.2022

    • @wanu6740
      @wanu6740 ปีที่แล้ว

      Thank you

    • @jamestavolacci7137
      @jamestavolacci7137 ปีที่แล้ว

      THANK YOU!!

  • @lightninginmyhands4878
    @lightninginmyhands4878 5 ปีที่แล้ว +51

    1:10:15 Corey, the best feeling was shutting down that console and still seeing my site online. THANK YOU

    • @naveen3046
      @naveen3046 4 ปีที่แล้ว +2

      How to enable multiple logins in Flask. When I deployed my Flask app in Heroku , only one can login at a time. The app collapses when multiple users tried to login please help me to solve this.

    • @voodoo6729
      @voodoo6729 4 ปีที่แล้ว +3

      @@naveen3046 are you using flask's internal session? You might wanna use something like JWT for aurhorization and Redis for better session management

    • @naveen3046
      @naveen3046 4 ปีที่แล้ว +1

      @@voodoo6729 Thanx bro, but I solved it by adding threaded= True and session

    • @cdishiyam9232
      @cdishiyam9232 4 ปีที่แล้ว +3

      @@naveen3046
      can you provide the tut you used to deploy to heroku ???
      and is this video useful for this purpose

  • @Destide
    @Destide ปีที่แล้ว +3

    2023 and this series is still relevant thank you, Corey.

  • @catman392
    @catman392 2 ปีที่แล้ว +3

    Almost three years has passed, yet still a very helpful and thorough video! Thank you!

  • @GrahamRusson
    @GrahamRusson 4 ปีที่แล้ว +1

    Was tasked to get a Flask app up and running on a Linux server.
    I have never seen Linux before, and thought Gunicorn was something from my daughters fairy tale books. I followed this video step by step and without a hitch, had the site up and running within an hour. What an excellent video, well presented, to the point.
    Thank you very much.

  • @FranciscoMNeto
    @FranciscoMNeto 3 ปีที่แล้ว +1

    Corey is worth his weight in gold for this video alone

  • @ShyamGoli-u7z
    @ShyamGoli-u7z หลายเดือนก่อน

    A great thanks to you Corey, your way of explaining the topics in a simple way make me all the way to learn the flask in a easiest way. Each and every video is crystal clear and easy to follow. Thank again.

  • @priyanshumishra3014
    @priyanshumishra3014 4 ปีที่แล้ว +3

    Just an underrated TH-camr . Idk how does he even can't get a millions subscribers already , I find his videos so much useful for me 👍🏻.He don't even charge for his videos the least you all can do is atleast subscribe him and support through patreon

  • @Shadowless_Kick
    @Shadowless_Kick 3 ปีที่แล้ว +4

    I also successfully deployed a Flask based app with the same tree structure as Flaskblog to Heroku. Corey's video on deploying Django based apps to Heroku is very helpful, but about 20% of the steps in that video need to be adjusted for deploying Flask based apps

  • @jschoi9290
    @jschoi9290 2 ปีที่แล้ว +3

    Corey, just wanted to say I think you're the best Python teacher out there and I really appreciate all your videos (and I'm supporting via Patreon - although in small amounts - to show my appreciation). Take it easy and come back when you're ready to come back.

    • @jacquewilson5568
      @jacquewilson5568 ปีที่แล้ว

      Sadly, I dont think he is. His blog and GitHub accounts have not been active for several years now. I hope I am wrong :(

  • @philinnc
    @philinnc 4 ปีที่แล้ว +1

    I learned something new! 20 years as a sysadmin (OK, mostly Solaris/AIX/RHEL running various IBM, Sun and Oracle enterprise budget-drainware), and I'd never come across supervisor. Awsome!

  • @andygordon6880
    @andygordon6880 25 วันที่ผ่านมา

    Fantastic tutorial l. Every time I thought of a question, it was answered 20 seconds later. Thank you.

  • @brandonnilsson1358
    @brandonnilsson1358 5 ปีที่แล้ว +6

    Thank you so much for the guide Corey! I was able to make multiple web applications myself now. I did end up using pythonanywhere to start with when hosting my applications. However, I recently closed my first client (first time making money developing) and they didn't support a module I was using. This was a life saver, and your guides have been a tremendous help for learning Flask and Python in general! I'll be sure to donate as soon as possible :)

    • @coreyms
      @coreyms  5 ปีที่แล้ว +2

      Glad you were able to make your own apps and congrats on your first paid developer gig!

  • @davidfuller8156
    @davidfuller8156 4 ปีที่แล้ว +1

    Thanks Corey.
    Been programming for 25+ years, truly great pace, precision, and insight into what is important to the problem. Thanks for this and your many other great tutorials.
    In case anyone else chooses a different mechanism for getting SECRET_KEY, EMAIL_USER, etc. within the app factory of your __init__.py, I ran into a little bug (one of the very few I have seen in any of Corey's work.)
    If you call the factory with a different class than "Config", the factory ignores the class you pass and still uses the default for the config_class parameter, namely, "Config."
    Change the line:
    from:
    app.config.from_object(Config)
    to:
    app.config.from_object(config_class)
    Best All. Stay safe.

    • @coreyms
      @coreyms  4 ปีที่แล้ว

      Thanks for pointing that out!

  • @coditorium4317
    @coditorium4317 4 ปีที่แล้ว +3

    my god... This video could save me 5 days of misery and desperation when i was deploying my webapp. I wish that I had a material like this back then.

  • @SorinOltean77
    @SorinOltean77 4 ปีที่แล้ว +4

    Corey "let me clear my screen here" Schafer :D.
    You are amazing Corey thanks for the in depth tutorial!

  • @GabrielSantos-js7kk
    @GabrielSantos-js7kk 2 ปีที่แล้ว +2

    After many hours searching for how to deploy my project, I find everything I need right here.
    Amazing work Corey :D

  • @rakeshk5971
    @rakeshk5971 4 ปีที่แล้ว +2

    These tutorials are the highest quality. Hope you get more sponsors.

  • @mohansahu4286
    @mohansahu4286 3 ปีที่แล้ว

    Thanks Corey... deployed my app on linode....added a custom domain and done ssl with auto renew
    All thanks to you ..you are just great🙂

  • @howards5205
    @howards5205 11 หลายเดือนก่อน

    I appreciate your thorough guide and doing everything the right way. So many tutorials skip over every other detail and just show the bare minimum. I like how your video shows all the best practices. Thank you!

  • @ForWork-mj9fv
    @ForWork-mj9fv 3 หลายเดือนก่อน

    Biggest Corey, years and still helping 🔥

  • @senX
    @senX ปีที่แล้ว

    i know im late to the party, but this is as much as you can learn in an hour about a linux backend/deployment. it was usefull to me 4 years later, thanks a lot!

  • @kia4now
    @kia4now ปีที่แล้ว

    There are so many short "to the point videos" out there but I really appreciate what you did Corey, for us new guys it's helpful how you show best practices and all the little details. This is so helpful, especially for those that are not familiar with linux

  • @lolcommunity4987
    @lolcommunity4987 5 ปีที่แล้ว +17

    I followed along the tutorials and I deployed it to Heroku, if someone needs help - you are more than welcome to ask :)
    Like this comment so everyone will be able to see!

    • @ladahlberg
      @ladahlberg 4 ปีที่แล้ว

      Hello! how did you deploy it to Heroku? I need to deploy my flask app (not this one) to Heroku, and I'm having trouble with it. Your help is much appreciated.

    • @alankarsaxena6143
      @alankarsaxena6143 4 ปีที่แล้ว

      hey please help me to do so, i am having troubles while doing so.

    • @aimanazmie9200
      @aimanazmie9200 4 ปีที่แล้ว

      I'd like to know how you deployed it to Heroku. Please share.

    • @aboodbah1733
      @aboodbah1733 4 ปีที่แล้ว

      Hello I'd appreciate it if you could help me with the deployment on Heroku.

    • @GPBrachetta
      @GPBrachetta 4 ปีที่แล้ว

      It would be great if you could share how to deploy this to Heroku! Did you use postgresql?

  • @wisdomugochukwu2249
    @wisdomugochukwu2249 4 ปีที่แล้ว +2

    Thank you so much Corey, You are the best Instructor I have seen on TH-cam

  • @coreycarter5668
    @coreycarter5668 5 ปีที่แล้ว

    The way he explains everything in such a natural way makes it all seem so trivial! I love it! It all just....works when he explains it.

  • @BlurryBit
    @BlurryBit 5 ปีที่แล้ว +4

    Thanks! That helped me to get my first flask website started without any hiccup. I wish I had seen this video earlier. Would have saved 1 week of frustration. LOL!

  • @yomajo
    @yomajo 4 ปีที่แล้ว

    I was doing this with personal raspbery pi as a hosting server with headless SSH. Learned a ton. Thank You, proud Patron.

    • @chesterdorn4439
      @chesterdorn4439 4 ปีที่แล้ว

      Was it worth it with Raspberry?

    • @yomajo
      @yomajo 4 ปีที่แล้ว

      @@chesterdorn4439 Every work put in is worth something, I believe. However I don't host anything on rpi4 currently. Personal reasons, programming is not the only thing I do in life...

    • @chesterdorn4439
      @chesterdorn4439 4 ปีที่แล้ว

      @@yomajo Well, It's obvious. But I wouldn't do it if it is unusable :p That's why I was asking more about performance etc. hopefully.

  • @nicusan1000
    @nicusan1000 4 ปีที่แล้ว +1

    I'm so impressed of the way you teach and explain. Job very well done. Not much I can do to give you something in return, but I liked all your videos, I'm watching all the ads on your videos from beginning to the end (I know you might get some extra points on that) and click the ad links as well. The least I can do. BTW... I think people should not be allowed to register with whatever email address they want but one they can validate it is their own. So I would integrate the email verification right at the registration.

  • @tomasemilio
    @tomasemilio 3 ปีที่แล้ว

    Seriously, your videos are top of the top of the top. I knew all of what you explained here, but I wanted to watch the whole video again to see if there were more tips and enjoying the way you explained. Awesome man.
    You know what would be nice? Tutorial on prefect, much better than airflow. open source, pythonic, etc. great way for pipelines.

  • @altum5195
    @altum5195 3 ปีที่แล้ว +7

    If you are getting a 403 Forbidden error after setting up nginx, try changing the user in /etc/nginx/nginx.conf

    • @WaldoTheWombat
      @WaldoTheWombat 3 ปีที่แล้ว

      change it to what?

    • @WaldoTheWombat
      @WaldoTheWombat 3 ปีที่แล้ว

      @@LiverpoolDon1981 change it to what please?

    • @altum5195
      @altum5195 3 ปีที่แล้ว +1

      @@WaldoTheWombat your linux user

    • @dexter12x70
      @dexter12x70 2 ปีที่แล้ว +1

      YO that really worked ,to be more precise what he meant was , sudo nano /etc/nginx/nginx.conf ,
      when you open tat first line "user www-data " change to "user dexter" since dexter is my linux server name .Then save
      NOW sudo systemctl restart nginx , and NOW you will no longer have the 409 error and you will see the css file.

    • @deepgrowth353
      @deepgrowth353 2 ปีที่แล้ว

      OMG I second that, you are a life saver sir. Thank you!!!

  • @markakbarov3570
    @markakbarov3570 ปีที่แล้ว +1

    thank you for this awesome content. you wouldn't believe how many times I came back to this video for reference.

  • @The98Ringo
    @The98Ringo 5 ปีที่แล้ว +1

    Just came here to say that I really enjoy your videos. I’m still learning the basics of python and your videos are very compact and easy to understand. Thanks for your great work and the time and effort you put into these videos. They help me and probably many other college students a lot that can’t really effort expensive online courses.

  • @vat1980
    @vat1980 2 ปีที่แล้ว +1

    Your whole video series on this is absolutely amazing! Thank you.

  • @emirafiq5358
    @emirafiq5358 11 หลายเดือนก่อน

    doing a cloud engineering final project at the moment and needed a guide for NGINX configurations. i did mine on an EC2 and it works!! tq

  • @simoneonorato1223
    @simoneonorato1223 2 ปีที่แล้ว

    This video is like the bible. To follow step by step when launching a Flask app! Thanks man!

  • @scottdurica
    @scottdurica 3 ปีที่แล้ว +2

    For anyone that may not have seen many of Corey's videos, he puts out the absolute clearest and easiest to follow programming tutorials I've ever seen on YT.
    I'm curious why putting the sensitive data into a etc/config.json file is safe, but putting them back into the config.py isn't? Can someone up to no good gain access to the .py file but not the .json file?

    • @kizernis
      @kizernis ปีที่แล้ว

      Keeping sensitive data apart from distros like the Flask_Blog directory (which may travel from one machine to another) is a good thing.

  • @muhamadekhhaji4912
    @muhamadekhhaji4912 2 ปีที่แล้ว +1

    Thank you very much Corey. You have made my life a lot easier. Thank you

  • @r3xtez987
    @r3xtez987 2 ปีที่แล้ว

    I can't believe you're providing this high quality content for free! I'm supporting your channel to Patreon and recommend others to do so too!

  • @antonymedhat9872
    @antonymedhat9872 3 ปีที่แล้ว

    An insanely helpful and simple to follow video . Your way of explaining how to do things and what are all these config files ,etc are for, is straightforward . without this tutorial I wouldn't have succeeded in deploying using nginx . Thanks

  • @gouthamanush
    @gouthamanush 5 ปีที่แล้ว +3

    I really spun up an application with your help in just one weekend. Your videos are really great Corey. Keep up the good work. I am eagerly waiting for your SSL implementation as my boss wants me to move the application from http to https. I am really having a hard time adding certificates.

  • @andonii46
    @andonii46 2 ปีที่แล้ว

    dude, this content for free is amazing, really appreciate your effort!

  • @notbsd
    @notbsd 5 ปีที่แล้ว +3

    Great stuff Corey. Really blown away by the clarity and attention to detail.

  • @matttamer5096
    @matttamer5096 4 ปีที่แล้ว

    followed the whole series. Really amazing. Wish I could stop you at times to explain but figuring it out myself is when I learn the most!

  • @MarcusReaiche
    @MarcusReaiche 4 ปีที่แล้ว +1

    Hi Corey!
    Thanks for this wonderful series! Your videos are just amazing!
    Let me just add a small note for Windows users that are not able to activate the Windows Subsystem for Linux for any other reason. If one installs the Git Bash program they are able to ssh just like in a Linux machine. Everything works the same! So, there is no need to install PuTTY even if you are running Windows 8.
    Hope this can be useful to someone.

    • @footballforfun2054
      @footballforfun2054 3 ปีที่แล้ว

      ok I have git bash so I can run the same commands, following in this tutorial on it easily, right?

  • @2bitsbyab
    @2bitsbyab 5 ปีที่แล้ว +2

    1 hour worth of GOLD.... Thank You

  • @007MrNiko
    @007MrNiko 3 ปีที่แล้ว

    Man THANK YOU, it is literally 3 am but I set up my first flask website on VPS without big problems, it is really I would say unique))) One more time, thank you for your effort and step-by-step detailed tutorial 😁😊😉
    P.S.: Keep it up man, we believe in you)))

  • @francescominojetti939
    @francescominojetti939 3 ปีที่แล้ว

    GREAT WORK!!!! Really! Its the most clear, complete, and well explained video I've seen about deploying flask app on linux server

  • @nandagopalpattanayak5823
    @nandagopalpattanayak5823 4 ปีที่แล้ว

    Really don't know why these 14 people have disliked the video... awesome content sir

  • @TheTwierdzenie
    @TheTwierdzenie 4 ปีที่แล้ว +3

    I've registered my website with Linode. Anything Corey recommends I believe must be good solution. Thank you Corey

    • @naveen3046
      @naveen3046 4 ปีที่แล้ว

      How to enable multiple logins in Flask. When I deployed my Flask app in Heroku , only one can login at a time. The app collapses when multiple users tried to login please help me to solve this.

  • @derricknjoroge2494
    @derricknjoroge2494 5 ปีที่แล้ว +2

    Hi Corey, kindly do a video on Flask Restful. Thank you for your tutorials. You reaally helping alot of aspiring developers especially in Africa.

  • @srikkar
    @srikkar 4 ปีที่แล้ว

    Thank you for making this video... i was looking to host my flask app on linux... you're my time saviour
    Some of your videos helped me in the past and made me a guy to reach for python questions in my Team.
    All credit goes to you....!
    Have become your Patreon :)
    Thanks Corey for your efforts in delivering such amazing Videos

  • @vipinpillai3389
    @vipinpillai3389 5 ปีที่แล้ว +3

    Thank you, very helpful.
    With the precise steps, I was able to deploy flask api in digital ocean.

  • @Existinginthespace
    @Existinginthespace 5 ปีที่แล้ว +4

    Thank you for this tutorial series, i really appreciate it!
    I think you should make a video on database migrations next.

  • @ritheshjarvis4177
    @ritheshjarvis4177 4 ปีที่แล้ว +1

    Excellent.. In this single video I get to learn lot of things.. Thanks Corey.. You are the Best..

  • @erikkalkoken3494
    @erikkalkoken3494 5 ปีที่แล้ว

    Awesome video! Wanted to learn how to setup Gunicorn on my VPS to run a flask app and your video explains it perfectly.
    One improvement suggestion for the NGINX part:
    You don't really want to delete and replace the _default_ file in _sites-enabled_ . That is just a symlink to the real _default_ file, which sits in _sites_available_ .
    Though this approach will technically work, it can lead to confusion later on, because you end up with two different _default_ files.
    Instead just open the _default_ file in _sites-available_ and replace its content in an editor.

  • @ahmadfadlyiksan3143
    @ahmadfadlyiksan3143 3 ปีที่แล้ว

    I literally use this tutorial for my current job, thanks a lot, Corey.

  • @new3
    @new3 4 ปีที่แล้ว +17

    For those getting timeout error when sending reset password request:
    According to this post, Linode seems to have blocked mailing ports due to spam problem, but you can ask them to unblock them after configuring DNS and rDNS records.
    www.linode.com/community/questions/19082/i-just-created-my-first-linode-and-i-cant-send-emails-why

    • @brendan3966
      @brendan3966 4 ปีที่แล้ว +1

      Thanks, I’m all having trouble getting supervisor working if you know anything about that too lol

    • @rroblesgo
      @rroblesgo 4 ปีที่แล้ว +1

      with DNS and rDNS configured and Linode response: "Per your request, I've removed the smtp restrictions for port 587 on this Linode",
      I can't send mail with smtplib.SMTPAuthenticationError: (534, b'5.7.14
      5.7.14 Please log in via your web browser and then try again.
      5.7.14 Learn more at
      5.7.14 support.google.com/mail/answer/78754 t8sm36077509wrq.88 - gsmtp')
      Is there anything to configure with port 587?. Thank you

    • @chesterdorn4439
      @chesterdorn4439 4 ปีที่แล้ว

      Thank you for support, this seems to be default problem now ;) Is there any other solution for automatic mailing to work properly without unlocking these ports?

  • @guidesifypteltd6435
    @guidesifypteltd6435 4 ปีที่แล้ว +1

    One of the least disliked videos on TH-cam. This video is genius!

  • @SandeepPareek1
    @SandeepPareek1 3 ปีที่แล้ว

    completed the tutorial series so far .. keep updating us with your knowledge... Thanks

  • @imerla1316
    @imerla1316 3 ปีที่แล้ว

    This man makes Just Incredible Videos and it's free. Thank you, Corey.

  • @georgesmith3022
    @georgesmith3022 5 ปีที่แล้ว +2

    Corey, excellent tutorial as always. I understood clearly all the steps for deployment

  • @talalnajam8692
    @talalnajam8692 5 ปีที่แล้ว +1

    Incredibly detailed and useful video. Thanks Corey

  • @orangemahrt
    @orangemahrt 2 ปีที่แล้ว +1

    I'm running into a litany of complications with Nginx permissions. My site works perfectly on 5000 in dev then starts running into 403 errors once on 8000, and I can't seem to pass the login page. The stderr and stdout files aren't very clear either. This whole tutorial is amazing... but I'm really struggling to walk away from it knowing what Nginx is actually doing, especially after hours of external research to no avail. I think I've become a bit spoiled with your quality of teaching and am struggling to get answers elsewhere. Would love to see a video from you on Nginx permissions, and maybe just server/user permissions in general. Thank you so much, Corey!!!!

  • @manashejmadi
    @manashejmadi 5 ปีที่แล้ว +1

    this is what we all needed! 1 hour of pure knowledge absorption. beautiful!

  • @compilations6358
    @compilations6358 5 ปีที่แล้ว

    Comprehensive lecture. Really appreciate that you provide explanation for every line. Can you make a short tutorial for using docker along with these components ?

  • @ExplosionBobXD
    @ExplosionBobXD 4 ปีที่แล้ว +1

    Dude, I am going to be your fans, what a good tutorial you have made, it’s pretty clearly and helped me solve my problem s

  • @antoniopafundi3455
    @antoniopafundi3455 3 ปีที่แล้ว +1

    Amazing tutorial! Thank you!
    Would be great if you could expand in case of multiple servers if you want your site to be available everywhere and how to deal with it efficiently.

  • @wild_elliot
    @wild_elliot 2 ปีที่แล้ว

    This Video is intresting already => shows how configuring your servers and the connectivity between the two securely as much as permissions work but it needs the ACL ones.... as well as deploying your web application ,, Good job and nice video

  • @WICKED672
    @WICKED672 4 ปีที่แล้ว +1

    Thanks for this tutorial. Very easy to understand and works perfectly.

  • @Kris-to7vh
    @Kris-to7vh 2 ปีที่แล้ว +1

    9:33 To avoid typing yes every so often, you can add the '-y' to your command. Like this:
    "sudo apt update && sudo apt upgrade -y"

  • @nuttygeek3798
    @nuttygeek3798 5 ปีที่แล้ว +2

    thankyou so much can't forget you , you helped me with my project thanks , i was really frustrated

  • @pranavshridhar452
    @pranavshridhar452 5 ปีที่แล้ว

    Loved the whole flask series! Thanks a lot. Sir, it would be awesome if you could do tutorials on data structures (Linked lists, stacks and queues).

  • @Mightylordx
    @Mightylordx 5 ปีที่แล้ว +1

    Thank you for posting this video and the one about SSL been trying to find a video that explains what to do.

  • @umarhussain9334
    @umarhussain9334 4 ปีที่แล้ว +4

    spent an hour debugging why my gunicorn kept failing, went through the logs, browsed lots of SO posts turns out i put in the wrong directory in the .conf file! loving linux though, thanks Corey!

  • @john-peterkrause7237
    @john-peterkrause7237 ปีที่แล้ว +1

    This video has helped me soooo much, thank you Corey!

  • @jakobjohansson2461
    @jakobjohansson2461 3 ปีที่แล้ว +1

    Great video, just wondering which tutorial video did you implemented the 'SECTRET_KEY' and SQLALCHEMY_DATABASE_URI'

  • @filipmucha94
    @filipmucha94 5 ปีที่แล้ว +2

    This is some incredible content. Thank you Corey!!!

  • @sathyaprakash777
    @sathyaprakash777 3 ปีที่แล้ว

    After a week of struggle Finally able to deploy it in heroku.such a relief.thank corey for nice tutorial.

    • @kyra2438
      @kyra2438 3 ปีที่แล้ว

      Hey do you think you can help me with this, i haven't been getting it to work on heroku atall?

    • @sathyaprakash777
      @sathyaprakash777 3 ปีที่แล้ว

      @@kyra2438 sure what is the problem ur facing

    • @kyra2438
      @kyra2438 3 ปีที่แล้ว

      @@sathyaprakash777 i cant get it to work atall its deploying i can see that but its not showing up on the site email me at raky100012345@gmail.com and ill send u pictures and more info if you want

    • @kyra2438
      @kyra2438 3 ปีที่แล้ว

      th-cam.com/video/n1P8B53CCxs/w-d-xo.html&ab_channel=Cairocoders i was using this video as a reference but i get thru all the steps but it gives me an error on heroku

    • @sathyaprakash777
      @sathyaprakash777 3 ปีที่แล้ว

      @@kyra2438 the problem I was facing is with secret key I replaced it with some random number instead of is.environ then it got deployed try this

  • @123qopsiznoq
    @123qopsiznoq 4 ปีที่แล้ว +1

    For someone who struggling with failed reset email function....
    If you've followed this video, then you must be using 'Linode'.
    In order to use sending email service, you should request to Linode Support Team to allow that port for smtp since 2019.

  • @Mankind5490
    @Mankind5490 5 ปีที่แล้ว +1

    Thank you so much my friend. Incredibly informative and tolerant of new developer knowledge :)

  • @mohnasnassr9816
    @mohnasnassr9816 4 ปีที่แล้ว

    Thank you so much for putting the time to create this tutorial, it's really amazing

  • @DanKardell
    @DanKardell 2 ปีที่แล้ว +1

    Great job. Question at 17:xx you issue a ssh-keygen and overwrite your existing id_rsa file. Won't that now invalidate any other systems that you used that id_rsa file in because you overwrote it, thus locking you outout of other servers? Why would you not use your existing id_rsa file?

  • @kevian182
    @kevian182 3 ปีที่แล้ว

    Excellent video! Very clear and explained step by step.

  • @JoshuaBlais
    @JoshuaBlais 5 ปีที่แล้ว +1

    Great guide, this was awesome and saved me so much time in getting a site live!

  • @alexandreredon2887
    @alexandreredon2887 3 ปีที่แล้ว +1

    Nice ! Waiting for the deployment using Heroku !

  • @jmish21
    @jmish21 3 ปีที่แล้ว

    If you want to deploy your app on heroku you need to pip install gunicorn, create Procfile (web: gunicorn run:app) and also you need to pip freeze > requirements.txt

  • @shreyviradiya5222
    @shreyviradiya5222 5 ปีที่แล้ว +33

    please do a video on how to deploy this blog on heroku?

    • @knightofcode
      @knightofcode 3 ปีที่แล้ว

      inbox have mine on heroku kelvinwainaina03@gmail.com

    • @mathewsjoy8464
      @mathewsjoy8464 3 ปีที่แล้ว

      @@knightofcode hey i sent you an email my email is mathews2492@gmail.com please can you check :D

  • @gel1742
    @gel1742 5 ปีที่แล้ว +1

    Thanks always for great video tutorial. Always very informative. 👍

  • @alan-j
    @alan-j 5 ปีที่แล้ว +2

    Amazing Video Corey.. Thank you fot the detailed one..

  • @nabeelakram25
    @nabeelakram25 3 ปีที่แล้ว

    Perfectly explained, thank you Corey

  • @felixfurger3000
    @felixfurger3000 3 ปีที่แล้ว

    This video is such good content, very helpful even in 2021. Thank you a lot

  • @luismarin4471
    @luismarin4471 5 ปีที่แล้ว +3

    Muchas gracias por tu tiempo, fue de mucha utilidad este tutorial!.

  • @Juanoetdm
    @Juanoetdm ปีที่แล้ว

    Corey, thank you so much for your videos. More than helpful.