Тёмный

How to Deploy a Flask App and Postgres Database to Render 

Pretty Printed
Подписаться 96 тыс.
Просмотров 45 тыс.
50% 1

In this video, I will show you how to deploy a Flask app and a Postgres data to the Render service. render.com
Need one-on-one help with your project? I can help through my coaching program. Learn more here: prettyprinted.com/coaching
Get the code I wrote in this video: prettyprinted.com/l/kEH
Twitter: / pretty_printed
Github: github.com/prettyprinted

Опубликовано:

 

12 янв 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 90   
@gordanilic1816
@gordanilic1816 5 месяцев назад
Thank you very much for this video! First flask app is finally live!
@franklinikeh5212
@franklinikeh5212 Год назад
THANK YOU VERY MUCH!!! 😁😁, I'm so happy now after deploying my first flask application on render.
@hongscave
@hongscave 8 месяцев назад
A clear teaching style, thanks, subbed.
@MrDelliSanti
@MrDelliSanti Год назад
I was just researching last night how to transition from SQLite to Postgres. Your content has been a major help for me. Cheers!
@prettyprinted
@prettyprinted Год назад
Glad I could help. Thanks for watching!
@derekjung2051
@derekjung2051 3 месяца назад
Such an amazing video! Worked perfectly to make a postgresql database and to also launch my flask app, thanks so much! I did need to watch another video to add my custom domain, but that was easy peasy relative to this, so thanks so much!
@walopes
@walopes Год назад
Man, your video has saved me!! hahaha Thanks a lot buddy, amazing content
@jonthomas3543
@jonthomas3543 9 месяцев назад
If you notice all of the dependency versions are not accepted by render know you are not alone. Remove the `==` and the version number after for each dependency in the requirements.txt file. For example, just leave `Flask` and remove the rest of its version information. I hope this helps and hope that your hosting journey is calmer after resolving this issue.
@zeddyemy
@zeddyemy 8 месяцев назад
Did notice. Thanks
@diegojaraestivill5620
@diegojaraestivill5620 7 месяцев назад
Thank you so much , this commentary helps me a lot
@zeddyemy
@zeddyemy 7 месяцев назад
@12shashikha9 What is the expected response, and what do you actually get from the endpoint deployed on render? An error??
@12shashikha9
@12shashikha9 7 месяцев назад
@@zeddyemy hey,if you can share your LinkedIn or other platform I can share details on that,the response is json data I'm getting it on local host when entering the end point,but not after I deployed on render the error I'm getting is 404.
@12shashikha9
@12shashikha9 7 месяцев назад
@@zeddyemy Hey, the response is json data,I'm getting the response on local host when I'm entering the endpoint but after deployed on render on my endpoint I'm not getting the response ,I'm getting an error 404
@longtruong6596
@longtruong6596 Год назад
Thank you very much. I connected to DB on Render. That's really helpful.
@marcoshernancostamanso631
@marcoshernancostamanso631 16 дней назад
Very illustrative and straight to the point, thank you very much!!
@oluwatobiakintola674
@oluwatobiakintola674 Год назад
Thanks for making this video🤗🤗🤗
@pascualaldorasi
@pascualaldorasi 4 месяца назад
THANK YOU VERY MUCH!!! The Best video about Render and Database
@camiloalonso3709
@camiloalonso3709 Год назад
Sir you are a fucking living legend. You have no idea for how long have I searched for this. Subscribed!
@wrestling1357
@wrestling1357 Год назад
thanks you so much, helped me
@pietraderdetective8953
@pietraderdetective8953 Год назад
Great video! What's your opinion let's say from the experience of using both Render and Pythonanywhere? Like which one do you prefer and why?
@luisandraschko9060
@luisandraschko9060 7 месяцев назад
You are THE men!
@bencipherx
@bencipherx Год назад
I thought of doing this yesterday, I hope they do have a workflow so we can make it a staging server.
@prettyprinted
@prettyprinted Год назад
One way to make a staging server is to create a separate service that gets deployed from a different branch in your repo.
@krasimirzhelezov
@krasimirzhelezov 2 месяца назад
Thank you, bro!
@dmbrv
@dmbrv Год назад
great video
@prettyprinted
@prettyprinted Год назад
Thanks for watching!
@mateusrohden124
@mateusrohden124 8 месяцев назад
THANK YOU SO MUCH
@K.Huynh.
@K.Huynh. 3 месяца назад
Thank you so much
@diegojaraestivill5620
@diegojaraestivill5620 7 месяцев назад
Excelente video
8 месяцев назад
Hello there, I was able to deploy my app but now I have issues with the static folder using a persistent disk. I've established an app.static_folder pointing to the mount path but how should I manage the changes made to static files locally? Hope you can help or also make a video covering that stuff. Thanks!
@user-vc2kk8sd9d
@user-vc2kk8sd9d Месяц назад
thank you bro
@abd2re
@abd2re Год назад
THANK YOU THANK YOU THANK YOU
@yuripeixinho3727
@yuripeixinho3727 Год назад
you are amazing
@codewithray
@codewithray Год назад
Amazing video. Which hosting service do you recommend for Django apps? (For a person on a budget)
@prettyprinted
@prettyprinted Год назад
Render works well for Django as well. You can also try the AWS free tier and deploy using one of their services.
@valeriktr00
@valeriktr00 Год назад
THANKS A LOT MAN U ARE COOL
@prettyprinted
@prettyprinted Год назад
Thanks for watching!
@Albertmars32
@Albertmars32 9 месяцев назад
Hello, how come we didn't need to use Caddy like in your other video? This one seems way easier to go about deploying a website.
@anonymousyouth
@anonymousyouth Год назад
What is there in extension. Py can i get the code
@Lenuxcs
@Lenuxcs Год назад
I can't see the sample code of your video on github, the folder is empty
@MagnusAnand
@MagnusAnand Год назад
Do you have a video for Django?
@kabhi1
@kabhi1 Год назад
thanks your video really heapled me had some issues with code the and render usings versions of python may be renders free version dont allow new versions of depedencies in requirements.txt file. but finnaly solved issues and my website is live.
@prettyprinted
@prettyprinted Год назад
You can use newer versions. You just have to set the Python version in your environment variables. Thanks for watching!
@xx482
@xx482 Месяц назад
thanks for the video , i am unable to connect to Internal Database URL in render it is throwing error , but when i used external one i am able to connect , can you please let help me
@ekunnusitheophilus6587
@ekunnusitheophilus6587 9 месяцев назад
One issue I have with render is not having the latest versions of your libs, modules or packages in your reqs.txt file. It's really hassle.
@asliddintursunov7356
@asliddintursunov7356 22 дня назад
I used flask Blueprints, so does the deployment will be same or is there any changes when using Blueprints???
@nofluffagain
@nofluffagain Год назад
great video. but I can't seem to access the code in the github link in the description. seems the submodule isn't accessible as it is on your other videos
@justynabednarko133
@justynabednarko133 Год назад
I also don't see it.
@Skwez850
@Skwez850 9 месяцев назад
I had to swap the start command with 'waitress-serve --port=8000 main:app' (as in using waitress instead of gunicorn). Other than that everything worked thanks.
@theanimeguy4556
@theanimeguy4556 Год назад
The free tier is free for how many days ??
@syedmujahid9860
@syedmujahid9860 6 месяцев назад
How Can i connect my own database to render environment, plZ
@seyichamber2398
@seyichamber2398 10 месяцев назад
Is this for one function? How do I run my entire program?
@AlgoTraderOnline
@AlgoTraderOnline Год назад
Hi. Just a quick question. When you connect to the Database with DBeaver: Database -> Schemas -> Public -> Tables and then you can edit and change information as needed, what exactly does Public mean? Does it mean the database is accessible publicly? With the same setup you used in Render, as long as the User Name and Password are kept private, is the database private? Best
@prettyprinted
@prettyprinted Год назад
public is the default schema name in postgres. It's available to everyone who has your database credentials. Your database itself won't be accessible unless someone has credentials, so yeah you just need to keep them private.
@AlgoTraderOnline
@AlgoTraderOnline Год назад
@@prettyprinted Ah right. That makes sense!
@lolalikee
@lolalikee 9 месяцев назад
Oct 18 11:38:42 PM Error: Working outside of application context. Oct 18 11:38:42 PM Oct 18 11:38:42 PM This typically means that you attempted to use functionality that needed Oct 18 11:38:42 PM the current application. To solve this, set up an application context Oct 18 11:38:42 PM with app.app_context(). See the documentation for more information. This error keeps popping up after building I'm not sure how to fix it
@sleepysapphire2349
@sleepysapphire2349 9 месяцев назад
i have stumbled with that problem as well but found the solution, here you go: from app import app, db app.app_context().push() db.create_all()
@alejandrorodriguez4479
@alejandrorodriguez4479 Год назад
Is there a way to tell Render to run my application on a certain version of Python? for example in 3.9
@adamfm8
@adamfm8 10 месяцев назад
Yes - under Settings > Environment > Environment Variables: Key: PYTHON_VERSION Value: whatever version*
@kabhi1
@kabhi1 Год назад
i am usuing sqlite for a data base do i still need to convet it into postgressql??
@prettyprinted
@prettyprinted Год назад
You don't need to use Postgres, but sqlite may not work well on Render's filesystem.
@westlydavid5679
@westlydavid5679 Год назад
someone help me how to do it with nodejs
@makingtechfriendly
@makingtechfriendly Год назад
export is set in Windows
@AlgoTraderOnline
@AlgoTraderOnline Год назад
Really helpful video. I followed the steps exactly and managed to get my we service running. But when I try to write to the database I get an error as below. Any thoughts please ? Web Service Error psycopg2.OperationalError: SSL error: decryption failed or bad record mac Database Error SSL error: decryption failed or bad record mac
@prettyprinted
@prettyprinted Год назад
I haven't seen that error before. Do you have encrypted data on any of your tables?
@AlgoTraderOnline
@AlgoTraderOnline Год назад
@@prettyprinted Hey, Thanks so much for the reply! Big fan and subscriber of your videos. Actually the issue comes about when the External Database connection is using SSL but Render does not have SSL for Internal connections between the Webservice and Database. So I had to add a ?sslmode=disable at the end of the Internal Database URL and it works fine. Hope this helps other viewers as well! Cheers from the UK.
@prettyprinted
@prettyprinted Год назад
@@AlgoTraderOnline That's good to know!
@sakshisuryawanshi3101
@sakshisuryawanshi3101 Год назад
I've done my flask project with SQLite, will I be able to deploy it on render. Can we deploy SQLite database?
@prettyprinted
@prettyprinted Год назад
Yeah you should be able to. Just make sure you use a SSD disk when you deploy.
@Harleyotter
@Harleyotter Год назад
what command do I use instead of "export" on windows?
@prettyprinted
@prettyprinted Год назад
"set" instead of "export"
@redelocadora4638
@redelocadora4638 Год назад
How to create tables in render database?
@prettyprinted
@prettyprinted Год назад
You can do it the same way you do locally. Just use the render database connection on your local machine run either db.create_all() or Flask Migrate.
@valentinsteam
@valentinsteam Год назад
should've explained how to set it up on windows also I lost myself at the export command which isn't recognized by windows
@priyanshumishra2951
@priyanshumishra2951 Год назад
the process is same on windows too?
@hit0r1
@hit0r1 Год назад
I can't on windows
@md.raeeshalam9289
@md.raeeshalam9289 Год назад
but it is a django app
@pinesoftai
@pinesoftai 10 месяцев назад
what is create_app???? there is nothing called create_app in your entire project? so confusing....
@ahmadaskar3360
@ahmadaskar3360 Год назад
It uses an older version pf python!. I can not deploy of my own
@cdb8987
@cdb8987 Год назад
I am having this same problem....I can't get it to deploy using python 3.10
@ahmadaskar3360
@ahmadaskar3360 Год назад
@@cdb8987 i solved it, you can set the python version in environment variables
@zparkles
@zparkles 3 месяца назад
Hi thank u for this! But I got an error "RuntimeError: Either 'SQLALCHEMY_DATABASE_URI' or 'SQLALCHEMY_BINDS' must be set." I've made sure that I used app.config['SQLALCHEMY_DATABASE_URI'], do u know what I should I do? Can I see what is on your extensions.py? Thanks in advance!
Далее
Stop, Intel’s Already Dead!
13:47
Просмотров 317 тыс.
Getting Started With Testing in Flask
28:31
Просмотров 24 тыс.
How To Deploy A Flask App on Heroku (2024)
7:03
Просмотров 1,4 тыс.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Просмотров 1,6 млн
Flask app with PostgreSQL
13:57
Просмотров 37 тыс.
Deploy with Docker - Step-by-step Tutorial
20:20
Просмотров 16 тыс.