Cory Zue
Cory Zue
  • 73
  • 210 155
Deploy Django to any VPS in 10 minutes with Docker, Kamal 2 and SaaS Pegasus
In this video I show the complete process of deploying a Django app to production on a Hetzner VPS using Kamal 2. I have a production application ready to go in about 10 minutes for less than $5 / month!
Links:
- Kamal: kamal-deploy.org
- Hetzner (affiliate link, comes with $20 credit) hetzner.cloud/?ref=49vhF1w3TIyB
- SaaS Pegasus: www.saaspegasus.com/
- Pegasus Kamal Docs: docs.saaspegasus.com/deployment/kamal/
- Detailed Guide: www.coryzue.com/writing/kamal-django/
Переглядів: 238

Відео

The SaaS Pegasus CLI: A blazing-fast way to start a new Django app
Переглядів 745Місяць тому
In this video I give a brief tour of the SaaS Pegasus CLI. A new library that allows you to instantly spin up complete Django apps in your Pegasus projects. SaaS Pegasus: www.saaspegasus.com/ Pegasus CLI: github.com/saaspegasus/pegasus-cli/
Modal Forms with Django, HTMX, and Tailwind CSS
Переглядів 3,5 тис.4 місяці тому
This video shows how you can convert a traditional Django form to an HTMX modal element in just a few quick steps. I live-code the process of updating my app's standard Django form to use an HTMX modal element, showing the issues you run into along the way and how to fix them. HTMX: htmx.org/ DaisyUI Modal: daisyui.com/components/modal/ Blog post where I got the empty response swap idea: blog.b...
Setting up a Stripe Pricing Table in a Django project with SaaS Pegasus
Переглядів 4544 місяці тому
In this video I set up a Stripe pricing table and configure it in my Django application. Sorry about the audio quality! My mic kept auto-adjusting the volume. Chapters: 0:00 - Setting up your products and pricing table in Stripe. 3:40 - Updating your project to use the pricing table and demo.
Setting up your production Django project to use S3 for media files
Переглядів 6864 місяці тому
In this screencast I show how you can set up an S3 bucket to serve your Django media files, while setting it up for my own application using Kamal. Links: Guide: testdriven.io/blog/storing-django-static-and-media-files-on-amazon-s3/ SaaS Pegasus: www.saaspegasus.com/ Chapters: 0:00 - What are media files and why do we need to store them externally? 1:30 - Configuring your S3 bucket for media fi...
Implementing usage-based subscriptions with Django and Stripe
Переглядів 9286 місяців тому
This is a screencast to help you build a billing system with Django and Stripe. The focus is on how you can add usage limits to your application, for example, if you want to give your users a certain amount of credits each month based on their subscription plan. I talk about a few different ways you can approach this problem, and then add usage-based billing tiers to my translation application ...
Building a streaming ChatGPT clone, with Django, Channels, and HTMX
Переглядів 2,7 тис.6 місяців тому
In this video I walkthrough the process of building a ChatGPT clone step-by-step using Django, websockets, and HTMX. I break down each piece of functionality into a single commit, and then explain and demo that commit. At the end we have a fully functional, streaming chatbot app! Links: Channels Tutorial: channels.readthedocs.io/en/stable/tutorial/index.html HTMX Websockets: htmx.org/extensions...
Working on an Onboarding UI with Django and Tailwind CSS
Переглядів 5476 місяців тому
This screencast is Part 6 of "Building a SaaS Application with Django and Pegasus (2024 edition)," where I will build a SaaS from the ground up using SaaS Pegasus and Django. In the episode I clean up the UI we built last time. I run through the onboarding flow again and clean up a lot of the mess we left in place the first time around, including updating layouts, adding images, and introducing...
SaaS Pegasus: Demo of Standalone React/Vite app against a Django Backend
Переглядів 7246 місяців тому
This video is a short demo of the new React single-page application that ships with SaaS Pegasus version 2024.3. SaaS Pegasus: www.saaspegasus.com/ Documentation: docs.saaspegasus.com/experimental/react-front-end
Making your first views in a Django application
Переглядів 6286 місяців тому
This screencast is Part 5 of "Building a SaaS Application with Django and Pegasus (2024 edition)," where I will build a SaaS from the ground up using SaaS Pegasus and Django. In the episode we finally start our UI! I build on the past data model and translation work and create an onboarding flow for the application which allows new users to create projects, upload translation files, generate th...
Building a tool to translate an app into any language with Django, OpenAI, and SaaS Pegasus
Переглядів 6117 місяців тому
This screencast is Part 4 of "Building a SaaS Application with Django and Pegasus (2024 edition)," where I will build a SaaS from the ground up using SaaS Pegasus and Django. As I say at the start of the video: If the SaaS I'm building is a wrapper around a single script, then this is that script. In the episode I build on top of the work done last time and build out the core technology my appl...
Writing your first code in a new Django/SaaS Pegasus application
Переглядів 1,1 тис.7 місяців тому
This screencast is Part 3 of "Building a SaaS Application with Django and Pegasus (2024 edition)," where I will build a SaaS from the ground up using SaaS Pegasus and Django. In this episode I build the data models and business logic for my translation application. By the end of the episode I have data models in place and a proof-of-concept function generate the right translation file format fr...
Getting your Django application deployed with Hetzner, Docker, Kamal, and SaaS Pegasus
Переглядів 1,5 тис.7 місяців тому
This screencast is Part 2 of "Building a SaaS Application with Django and Pegasus (2024 edition)," where I will build a SaaS from the ground up using SaaS Pegasus and Django. In this episode I deploy my application! Specifically, I cover: 1. Creating a new Hetzner server for your project. 2. Preparing the server for Docker-based deployment. 3. Setting up DNS in Cloudflare. 4. Creating your imag...
Setting up a new Django project with SaaS Pegasus (2024 edition)
Переглядів 2 тис.7 місяців тому
This screencast is Part 1 of "Building a SaaS Application with Django and Pegasus (2024 edition)," where I will build a SaaS from the ground up using SaaS Pegasus and Django. This inaugural episode covers: 1. Describing the app I'm going to build - a service to translate applications with AI. 2. Setting up my Pegasus project (including a blow-by-blow walkthrough of all the options in Pegasus). ...
SaaS Pegasus's Github Integration
Переглядів 7627 місяців тому
This video is a short screencast demoing the brand new Github integration in SaaS Pegasus. You can now push your Pegasus projects to Github in seconds and upgrade and make changes to your project configuration via automatic pull requests.
How do domain-specific chatbots work? An overview of retrieval augmented generation (RAG)
Переглядів 5779 місяців тому
How do domain-specific chatbots work? An overview of retrieval augmented generation (RAG)
Building a website gallery with Django and Tailwind CSS
Переглядів 1,1 тис.9 місяців тому
Building a website gallery with Django and Tailwind CSS
How to deploy a Django application to any VPS in 20 minutes with Docker, Kamal and SaaS Pegasus
Переглядів 3,4 тис.9 місяців тому
How to deploy a Django application to any VPS in 20 minutes with Docker, Kamal and SaaS Pegasus
Adding a LangChain to a Django Project to Build a Domain-Specific Chat App (with RAG)
Переглядів 3,8 тис.10 місяців тому
Adding a LangChain to a Django Project to Build a Domain-Specific Chat App (with RAG)
Pegasus: A Websockets-based Group Chat Application with Django and Channels
Переглядів 972Рік тому
Pegasus: A Websockets-based Group Chat Application with Django and Channels
Pegasus: The E-Commerce Example Application with Django and Stripe
Переглядів 1,1 тис.Рік тому
Pegasus: The E-Commerce Example Application with Django and Stripe
Building an Ecommerce Store with Django and Stripe Payments (Live Coding)
Переглядів 1,7 тис.Рік тому
Building an Ecommerce Store with Django and Stripe Payments (Live Coding)
How do chatbots on your data work? Retrieval Augmented Generation (RAG): The LLM side
Переглядів 3,6 тис.Рік тому
How do chatbots on your data work? Retrieval Augmented Generation (RAG): The LLM side
Restricting content based on user permissions with Django and SaaS Pegasus
Переглядів 586Рік тому
Restricting content based on user permissions with Django and SaaS Pegasus
Adding a Unique ID Field to a Django Model after Creating It
Переглядів 2,8 тис.Рік тому
Adding a Unique ID Field to a Django Model after Creating It
Scriv.ai Product Demo
Переглядів 1,5 тис.Рік тому
Scriv.ai Product Demo
Pegasus: Setting up a new project in less than 5 minutes
Переглядів 13 тис.Рік тому
Pegasus: Setting up a new project in less than 5 minutes
ChatGPT in Django demo with SaaS Pegasus
Переглядів 2,7 тис.Рік тому
ChatGPT in Django demo with SaaS Pegasus
Building a ChatGPT clone in React and Django (Part 2)
Переглядів 484Рік тому
Building a ChatGPT clone in React and Django (Part 2)
Building a ChatGPT clone in React and Django (Part 1)
Переглядів 2 тис.Рік тому
Building a ChatGPT clone in React and Django (Part 1)

КОМЕНТАРІ

  • @younesabdenaceraitemrar5252
    @younesabdenaceraitemrar5252 7 годин тому

    hello cory, how to run makemigrations on windows ? i have successfully setup project .

  • @demondragon
    @demondragon 20 годин тому

    Thanks for this clear instruction video and the written guide! I was able to deploy my Saas Pegasus website on a hetzner VPS (on a test domain) and everything seems to work like a charm.

  • @MichaelDoornbos
    @MichaelDoornbos 3 дні тому

    Getting a little easier with every version.

  • @ContentRedefined
    @ContentRedefined 4 дні тому

    Not sure if it was my issue or general, but I did have to manually install pyyaml after installing the cli for it to work. Maybe it needs to be added to dependencies?

  • @ContentRedefined
    @ContentRedefined 4 дні тому

    Big time saver! Thanks Cory!

  • @timnelson1068
    @timnelson1068 22 дні тому

    Corey, nice. However...I take it since we are using the SPA react frontend, we have a bit of work to do to build up a UI around it right?

  • @yashsantani8541
    @yashsantani8541 27 днів тому

    Hi i am trying to implement langgraph in django with postgres but i see that model object connection are set to idle any idea

  • @JoelFunk
    @JoelFunk 29 днів тому

    Love this!

  • @alpertekin8568
    @alpertekin8568 Місяць тому

    Great. Thank you so much. But as I understand there is no command for team apps. Do you have any plan to add for team apps as well?

    • @czue
      @czue Місяць тому

      Yes! Coming soon.

  • @sachin__ak
    @sachin__ak Місяць тому

    Hey Corey, does pegasus have saas starter for pure django rest framework?

    • @czue
      @czue Місяць тому

      No it doesn't. I have been working on better support for standalone front ends (docs.saaspegasus.com/experimental/react-front-end/) which is where something like that would eventually end up. But it's a ways away from being fully-featured.

  • @stefanb4340
    @stefanb4340 Місяць тому

    Thanks, very useful!

  • @nebpublic
    @nebpublic Місяць тому

    Thx Cory. This fixes one of the few minor gripes I've had with Pegasus. Making a great tool even better.

    • @czue
      @czue Місяць тому

      Great to hear!

  • @MichaelDoornbos
    @MichaelDoornbos Місяць тому

    Love this direction. Excellent work!

    • @czue
      @czue Місяць тому

      Thanks Michael!

  • @burhanuddinbaig7031
    @burhanuddinbaig7031 Місяць тому

    Thanks alot, Is it possible for a video for Django on Hostinger?

  • @h4elkad
    @h4elkad Місяць тому

    Thank you for this tuto, it's really helpful

  • @__byteWise01
    @__byteWise01 2 місяці тому

    I loved your video! Quick question: How can I allow users to integrate the chatbot from my domain into their website? I’m not sure how to go about it and would appreciate any advice or resources you could share.

  • @quran-book-of-signs
    @quran-book-of-signs 2 місяці тому

    Source Code?

  • @s41ted
    @s41ted 2 місяці тому

    Hey mate, I know in one of your blog posts you mentioned you weren't certain about the value of these longer form videos as the view count dropped off for videos further into the series... it might be useful to know that this was super helpful for me as a newbie to Python / Django / Pegasus to quickly get up to speed on the basics.

    • @s41ted
      @s41ted 2 місяці тому

      I jumped around quite a lot, referenced official docs and tutorials when I didn't understand stuff, got LLMs to explain concepts if it wasn't clear etc etc. But just having you actually work through a project, and seeing the structure and flow of development was great.

  • @heather2039
    @heather2039 3 місяці тому

    Really informative, thank you!!!

  • @aminu_waziri
    @aminu_waziri 3 місяці тому

    Mann thank you for this

  • @leonardoschwartzhypnosis
    @leonardoschwartzhypnosis 3 місяці тому

    Cory, and plans to add Svelte 5 as an option? I own a license of Pegasus, but I'm not really using it because I really want the kind of snappiness that frontend JS frameworks bring to the table. That said, I can't bear React, so I went with svelte and Sveltekit. However, I like the native I experience of working with python so sometimes I have to use FastAPI to run python in the backend. It'd be so awesome if I could do all the heavy lifting with pegasus while using svelte to take care of the front end (which is much, much dev friendly than all the other JS frontend flavors, in case you didn't try it yet!)

  • @snopoke.
    @snopoke. 4 місяці тому

    Could you use the "HX-Refresh" header to do the page refresh instead of the custom JS?

    • @czue
      @czue 4 місяці тому

      Oh wow, yes you can. Even simpler! Thanks for the suggestion.

    • @anze3db
      @anze3db 4 місяці тому

      @@czue I came here to say the same thing. HX-Refresh and HX-Redirect headers are super useful for these kinds of things!

    • @czue
      @czue 4 місяці тому

      @@anze3db For sure! Finding out stuff like this is a great side effect of learning in public. 😅

  • @bilbo1337
    @bilbo1337 4 місяці тому

    great stuff! anyway to refresh the name with HTMX without doing a full page reload?

    • @czue
      @czue 4 місяці тому

      Yes! In the event handler at the end where I do the page reload, you would instead close the modal and do another get to update the content. The blog post in the description does this at the end. You could also maybe return the content from the form post and do an oob swap?

    • @Latent33
      @Latent33 4 місяці тому

      @@czue one other thing to consider is using the hx-retarget="body" header on form success case. you had it initially returning a redirect which was getting swapped into the form contents but you could add hx-retarget header and it would then do a much faster and cleaner swap in of the updated body with no full refresh which keeps headers and scripts untouched and gives a much more SPA feel with less reload flash. You did have it returning a responseRedirect at that point which means two round trips to the server which is not ideal and I don't know if the hx-retarget header needs to be returned in the page you redirect to as well as I have not tested this myself. But the ideal would be to get it to just render back the whole page response at this point with the hx-retarget="body" header added in and it would then be a single server round trip.

    • @czue
      @czue 3 місяці тому

      @@Latent33 Ah that's cool! Didn't know about hx-retarget. In that world I guess you return the same contents of the page but without the head? Or, in this case you could just swap everything after the application skin (e.g. nav and sidebar), yeah? That's a fun pattern I will play with.

    • @Latent33
      @Latent33 3 місяці тому

      @@czue yeah several options for where and how to replace. I think htmx swaps just ignore the head data and only does the body so you could remove header and return a partial html or return the whole lot. You can also return the whole page so you don't have to recode your backend templates but use select or reselect to choose which portion to swap in

  • @benh96645
    @benh96645 4 місяці тому

    Perfect timing

  • @frameff9073
    @frameff9073 4 місяці тому

    thank you

    • @czue
      @czue 4 місяці тому

      You're welcome!

  • @samannwaysil4412
    @samannwaysil4412 4 місяці тому

    Here from redit. Cool app!

  • @Flavour_Dave
    @Flavour_Dave 4 місяці тому

    awesome!

  • @bertobertoberto3
    @bertobertoberto3 4 місяці тому

    Really nice! Ruby for the win again! I want to clarify something though, is the database outside of docker? Also how would you do automated builds and deploy? And how would you scale? I’m pretty sure there’s probably a ton of tutorials but just wanted a high level

  • @sagartamang0000
    @sagartamang0000 4 місяці тому

    You sir are a hero! You literally taught me so many things that I was stuck of months!!

  • @sherklan
    @sherklan 4 місяці тому

    thanks

  • @justinjackson3996
    @justinjackson3996 5 місяців тому

    Promo`SM

  • @Gem-gi7km
    @Gem-gi7km 5 місяців тому

    Is the source code uploaded to GitHub for the public by any chance?

  • @matiasdaloia9011
    @matiasdaloia9011 5 місяців тому

    Hey Corey!! I’m wondering if this could be used as backend for a mobile react native app. I’m building a saas which has a back office for doctors and a native app for patients. Thanks and regards Matias

  • @LiveWelLounge
    @LiveWelLounge 5 місяців тому

    is that we need to add subscription pricing before adding in django?

  • @sherklan
    @sherklan 5 місяців тому

    muchas gracias hermano

  • @stefanb4340
    @stefanb4340 5 місяців тому

    Hi , is it possible to create an app without the template using a standard django startapp command?

  • @jett_royce
    @jett_royce 5 місяців тому

    Great screencast, Cory! Lots of questions I had about using React within SaaS Pegasus were answered.

  • @clearthinking5441
    @clearthinking5441 6 місяців тому

    This is not async. When would you ever use a chatbot that is not async, doesn't that block the event loop ... ?

    • @GBOAC
      @GBOAC 6 місяців тому

      Let alone instantiate a client per incoming request

    • @czue
      @czue 6 місяців тому

      Thanks. Yeah, it should likely be async. It was ported from a more complex example with ORM access and other things that ended up being more trouble than it was worth to troubleshoot and I forgot to swap it back. Hopefully the concepts are helpful even with that oversight. I think most of the value for people and emphasis is on the front end side which doesn't change.

    • @czue
      @czue 6 місяців тому

      @@GBOAC Can you elaborate on this? Are you referring to the OpenAI client? Pretty sure that's a negligible performance operation.

    • @GBOAC
      @GBOAC 6 місяців тому

      @@czue for a few users maybe but this doesn’t scale obviously. And is the client async compatible anyway?

    • @czue
      @czue 6 місяців тому

      @@GBOAC i mean, the client is just a python object that makes web requests. i don't think there's any setup code or anything. and yes it's async compatible.

  • @shrideeptamboli
    @shrideeptamboli 6 місяців тому

    Can I upload documents and ask questions on them? Are the documents being uploaded on database? Github link?

    • @czue
      @czue 6 місяців тому

      Yes, that's the goal is to upload documents and chat with them. It uses the Django media / files framework. So a pointer to the file is stored in the Database and then the file itself is stored on the filesystem, S3, or whatever you've configured.

  • @czue
    @czue 6 місяців тому

    For those asking for the code, it's hard for me to share the repo since it's built on top of a proprietary product (SaaS Pegasus), but here is a Git patch file of the diffs for the entire video, which should help you apply it to your own Django projects. In addition to this diff you will need to set up a Django project and set up Channels. The full code is also now available in Pegasus. gist.github.com/czue/fc37f732f5c70cd16f38819d399b129f

  • @davidbolli4335
    @davidbolli4335 6 місяців тому

    great video, thanks. I would also be very interested in the repo

    • @czue
      @czue 6 місяців тому

      See pinned comment.

  • @skaus123
    @skaus123 6 місяців тому

    Great video. Is there a repo you could share ?

    • @czue
      @czue 6 місяців тому

      See pinned comment

  • @MuneebMomin
    @MuneebMomin 6 місяців тому

    I think this is something exactly what I need for my project. I’m still evaluating right now but I plan to get it if its something that I need. I already have a dashboard ready in react js it needs to be integrated to backend, I have a developer who’s taking forever to build SaaS application, I feel like I can be up and running with this SaaS Pegasus quickly, just don’t know if and how it’ll connect with my dashboard? How difficult it’d be for API development as I have not much experience with it, willing to learn but don’t have months to master. Is this right for me? Also, since I’m trying to make a GenAI product I need to integrate it with newer frameworks like Autogen, and vector DB would SaaS Pegasus support it? Looking forward to hearing from you will make my buying decisions swift. Video tutorials are awesome!

    • @czue
      @czue 6 місяців тому

      To be honest, while I'd love to have you using Pegasus I'm not sure it's the best fit or not. It maybe depends on what your main motivation for using it is. My biggest concern is that Pegasus is not (yet) ready to be run as a pure headless backend for a React front end. I did recently launch a lot of the groundwork, and a demo application for making this work, but not all of the functionality in Pegasus is available in this model / via APIs. So if you wanted teams, billing, etc. all ready to work out of the box with your React app, that's going to take some work to make happen. On the flip side, Pegasus does have a lot of the scaffolding for a Python-based SaaS ready to go, including best practices, data models, deployment, etc. As for Autogen - it's Python so it should be easy to plug into Pegasus, but I don't have any firsthand experience with integrating it. Vector DBs should be fine. See here: ua-cam.com/video/kqrO1SVUBt8/v-deo.html

  • @thuanquoc1231
    @thuanquoc1231 6 місяців тому

    Very nice, I will use this as a reference for my future hobby project.

  • @anze3db
    @anze3db 6 місяців тому

    This looks great! Great to see a practical example for web sockets with HTMX and Django Channels!

  • @DisabledCookie
    @DisabledCookie 6 місяців тому

    can you share the repo?

    • @czue
      @czue 6 місяців тому

      See pinned comment

  • @lucian6860
    @lucian6860 6 місяців тому

    Good video, keep it up!

  • @Jason-jb1tf
    @Jason-jb1tf 6 місяців тому

    Hi there, at 21:45 it appears that you didn't pixelate your postgres password and django secret key. Just wanted to give you a heads up! Looking at potentially becoming a pegasus customer in the near future to help me quickly get some projects started, and this series has been valuable so far to see how it will mesh with my own preferred workflows.

    • @czue
      @czue 6 місяців тому

      Eep - thanks for the heads up! After all that I'll have to change them.🤦 Good thing this isn't a production app yet! Edit: have changed credentials. Thanks again!

  • @ainbrisk545
    @ainbrisk545 6 місяців тому

    very cool! fun seeing the workflow

    • @czue
      @czue 6 місяців тому

      Thanks!