How to Deploy a Flask App to a Linux Server

How to Deploy a Flask App to a Linux Server

Tech With Tim

4 года назад

163,852 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@johnbryan1523
@johnbryan1523 - 07.01.2024 21:09

Thanks!

Ответить
@johnbryan1523
@johnbryan1523 - 07.01.2024 21:08

Wow great series for a noob in the Python. Currently working with Akamai(formerly Linode) as you have referenced in this final great video.
Why didn't you select the LAMP setup? Any particular reason? I set my stuff up using your recommendations, but a service ticket reply from Akamai asked if I knew they had it.
Again, appreciate your help!

Ответить
@jake9483
@jake9483 - 27.10.2023 19:40

Anyone else getting an internal server error when they finish the guide and go to the site?

Ответить
@DavidGriffis
@DavidGriffis - 11.09.2023 01:01

pronounced uh patchy

Ответить
@truestuff3828
@truestuff3828 - 17.08.2023 14:46

bro, why do you say "just don't touch anything". cant fix errors with this kind of explanation

Ответить
@naweendanushka3358
@naweendanushka3358 - 02.07.2023 10:38

Thanks tim for your video series . It is very helpful

Ответить
@primaireernovembre
@primaireernovembre - 18.02.2023 21:29

hello...can you give me a video to how i can change the ip to my domain name !!

Ответить
@CabalBoone
@CabalBoone - 25.12.2022 19:47

That was very pleasurable, thank you.

Ответить
@AzlanCoding
@AzlanCoding - 10.12.2022 07:20

Hi, thanks for your video. It really helped me set it up in my 1st generation iPad air. However, I would like to set up openssh's SFTP. How can I do this?

Ответить
@rmatveev
@rmatveev - 16.11.2022 00:08

Actually I did not get why you may need all these Apache sfuff.
Flask can work as without. Just need to change the default port from 5000 to 80 and take care of all static files in your application (which Apache take care about usually).

Ответить
@JT-qi4xx
@JT-qi4xx - 17.10.2022 14:35

Thanks @Tim. very helpful guide! however cmd: sudo apt-get install libapache2-mod-wsgi python-dev didnt work for me because of python3 I guess. so did cmd: sudo apt-get install libapache2-mod-wsgi-py3 instead and it did work. Thanks. you are the best

Ответить
@yuanjv
@yuanjv - 10.09.2022 04:51

i think many linux people will get mad after see you using sudo as root

Ответить
@foreverkatiexx3
@foreverkatiexx3 - 10.08.2022 00:47

I am getting a 500 Internal Server Error :( any things I should check? I was able to follow the video pretty easily, the only problem I ran into is that these two files were not found when I was transferring my files over:
/.venv/Lib/site-packages/pip/_internal/operations/_pycache_
/env/Lib/site-packages/jedi/third-party

I'm not sure what those were for, or what the content should be, so I would be surprised if that was the issue. Any ideas would be helpful, thanks!

Ответить
@potthegreen
@potthegreen - 23.07.2022 20:44

thanks Tim, I have a secure apache home server and I've been struggling to get my django and flask apps running online. I will give it a shot with your configs!

Ответить
@JamesFraze
@JamesFraze - 11.07.2022 02:29

I've followed the series in this and learned quite a bit about flask. Just a quick note that if you are "root" you don't need to type sudo. A security tutorial would be great because there are many things that can be improved on this section. Otherwise, great work, great explanations!

Ответить
@narekzamanyan893
@narekzamanyan893 - 12.06.2022 07:25

Thank you!!!

Ответить
@Dani-cr7cj
@Dani-cr7cj - 04.06.2022 22:41

Amazing playlist, thank you Tim. I hope to see the update version - Or comments about what has changed. Thank you very much.

Ответить
@weaselwords3386
@weaselwords3386 - 24.05.2022 00:39

Great tutorial - I ran into an issue on the winSCP part of moving files to the directory.
Reason : lack of privileges and needing root.
winSCP can inject a shell command at the point of connection under the Advanced setting within the session configuration.
click Advanced then under the Environment > SCP/Shell option add the command to the shell: field in this case 'sudo su -'
(this elevates the user id to root privileges at point of connection.)

Ответить
@roehrkard
@roehrkard - 10.04.2022 09:28

Step 6: Install and enable mod_wsgi - sudo apt-get install libapache2-mod-wsgi-py3
python-dev

got me past the error on this step which occurs in newer version of linux

Ответить
@saadkhan-ku8bl
@saadkhan-ku8bl - 30.03.2022 00:09

very nice

Ответить
@mattbarletta8100
@mattbarletta8100 - 24.02.2022 05:31

anyone else getting a 500 Internal Service Error?

Ответить
@tobiapioscivoletto3686
@tobiapioscivoletto3686 - 22.02.2022 12:21

Hi Tech, my script give me problem with Flask Session. The server response with a PermissionError: Permission Denied "/flask_session". I've tried all but nothing

Ответить
@luciaravazzi6925
@luciaravazzi6925 - 11.02.2022 00:45

Very cool man!!

Ответить
@liam1732
@liam1732 - 07.02.2022 08:03

I want to kiss you computer server man, you have helped me greatly, keep up the helpful videos!

Ответить
@ririraman7
@ririraman7 - 10.01.2022 00:46

Thank you.

Ответить
@miss_tech
@miss_tech - 01.01.2022 01:05

i did the exact same steps until the end i got a 500 error

Ответить
@mikhailshkaralevich574
@mikhailshkaralevich574 - 13.12.2021 12:04

Thank you! Your tutorial is great!

Ответить
@davoodazadin948
@davoodazadin948 - 28.11.2021 02:03

Enjoyed your videos , but i think you just performed half of steps to install apache and most of the time apache is for Php cause python has its own web server and apache installation is useless ,i personaly hate linux so these mistake are part of the bad OS documentation, Great playlist

Ответить
@polarpenguin7596
@polarpenguin7596 - 24.10.2021 21:17

fantastic tutorial!!

Ответить
@intrinsic524
@intrinsic524 - 05.10.2021 20:06

i think linode changed. apache error says "no module named flask" which is a python2 error

Ответить
@hexa3389
@hexa3389 - 21.09.2021 01:39

Madman typing sudo while root. True sigma grindset.

Ответить
@ta9995
@ta9995 - 09.09.2021 14:23

error
Not Found
The requested URL was not found on this server.

Ответить
@uzmapatil1045
@uzmapatil1045 - 31.08.2021 16:05

I created a face recognition program and now i want to create a web app for the same.
I have a problem, if anyone can help me:
1) This is the function to simply start my website

@app.route("/")
def start():
return render_template("home.html")

2) after the website opens, if i click on the button "CHECK", only then my web cam gets open and face recognition starts.
3) It then recognizes me and tells my name.
4) I want my name to be printed on the web page "home.html" , this is my code for that

@app.route("/home.html")
def wtf()
return render_template("home.html", Value=name)

5)this does not work at all. I think the problem is because I have the same route.
6) If i use another web page, then it works and prints the name, but i dont wanna use another page just to show my name, i wanna be able to do it in the same page.

help!!!.

Ответить
@tactiletech1111
@tactiletech1111 - 08.08.2021 04:56

ty tim great content as always

Ответить
@udaysankarg8269
@udaysankarg8269 - 24.07.2021 10:07

Tim, Can you also tell us how to deploy using docker containers - Flask app + DB and deploy on Cloud if possible

Ответить
@mikemcgtech
@mikemcgtech - 18.07.2021 03:56

This took me a while to get working, I found that I could not see the error logs, so I had to change the webApp.conf to point to the apache2 directory as the env variable must of not have been set (. Once I could see the error logs I found that the error was "no module admin". So I just added the basic flask app code from the linked digital ocean article and now it all works! I was getting "Internal service error before this"

Ответить
@brandonbahret5632
@brandonbahret5632 - 13.07.2021 20:31

Try "sudo apt-get install -y libapache2-mod-wsgi-py3" if you can't find libapache2-mod-wsgi.

Ответить
@brandonbahret5632
@brandonbahret5632 - 13.07.2021 02:36

The Linode offer is now $100.00 instead of $20.00 now in 2021 fyi.

Ответить
@abeilcoelho8625
@abeilcoelho8625 - 17.06.2021 23:29

What if we need to run more than one app on a server and/or on different ports? Thanks!

Ответить
@bikeanime5126
@bikeanime5126 - 17.06.2021 15:19

I had hosted my site using this Apache but I am getting Hello World program instead of my actual web site ... Could you help me ?

Ответить
@alfa_tosh6247
@alfa_tosh6247 - 15.06.2021 10:39

please do a flask-socketio app deployment using gunicorn, nginx, eventlet

Ответить
@stefanherbek2025
@stefanherbek2025 - 10.06.2021 11:48

Hi, great video. Thank you very much! Does this also work for Dash (Plotly Dash) Apps? Dash is based on Flask.

Ответить
@alainmarinelli1949
@alainmarinelli1949 - 07.06.2021 13:19

login doesn't work

Ответить
@cinquecento1985
@cinquecento1985 - 05.05.2021 18:47

You should teach Teachers how to teach.

Ответить
@junickim
@junickim - 03.05.2021 20:47

Uh, why sudo in root?

Ответить
@yuval1588
@yuval1588 - 26.04.2021 18:13

When typing the command:

sudo apt-get install libapache2-mod-wsgi python-dev

I get the following message:

"Note, selecting 'python-dev-is-python2' instead of 'python-dev'
Package libapache2-mod-wsgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source"

Does it need to be:
apt-get install libapache2-mod-wsgi-py3
?

Ответить
@jonxslays3205
@jonxslays3205 - 26.04.2021 02:22

tim i love you but "a-potch-e"?!?!?!? lmao.

Ответить
@htkocadag
@htkocadag - 24.04.2021 00:34

script link sorry

Ответить