Deploy Django app to Railway

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 41

  • @ajudmeister
    @ajudmeister  9 месяцев назад +9

    👉If you are using Django 5.0 the runtime.txt file (which discloses the python version) is actually required, as Railway's default Python version is still 3.8 🤨, but Django 5.0 only runs on 3.10 or higher!

  • @VitaliiPodhornyi
    @VitaliiPodhornyi 9 месяцев назад +2

    I want to say a big thank you. Thanks to your videos, I got a job offer. Please keep making new course and django with new stacks. Your videos and content is very useful

    • @ajudmeister
      @ajudmeister  9 месяцев назад

      Oh wow that’s amazing! Congrats! All the best! ❤

  • @Good-and-Geeky
    @Good-and-Geeky 9 месяцев назад

    Absolutely the best. All the others only do half the story and you do it all. Thank You

  • @Armin-q6p
    @Armin-q6p 9 месяцев назад

    Exzellent stuff Bro, always a pleasure to watch you

  • @codesnnippets7916
    @codesnnippets7916 5 месяцев назад

    Thanks for a much detailed guide on deploying django on Railway...I looked around for how to configure and deploy the database...all I got are quick default deployments~! Thanks again

    • @ajudmeister
      @ajudmeister  5 месяцев назад

      Thank you for the feedback. I am glad it’s useful

  • @Good-and-Geeky
    @Good-and-Geeky 9 месяцев назад +1

    It was driving me nut trying to get a simple test site up and running. The changes were not propagating to the site. Looked like the CSS wasn't being picked up. Thought it was something to do with Whitenoise or not getting the collect static done right. I spent a couple of days struggling. This morning I did some more tests and found my problem was the cache of the browser not letting the new stuff show.
    Locally everything was great.
    It is all quite complicated to deploy a Django project. I had a problem with the something not working because I am running the latest version of Django. Had to cut that out.
    Starting to think I'm winning and can get my proper project online after all the tests with the simple site.
    Things seem better on Railway than on Render for me. I like the interface and set up.

    • @ajudmeister
      @ajudmeister  9 месяцев назад +1

      Yes, the browser cache for the CSS changes made me go mad also a couple of times. Now I always do a hard browser refresh to make sure i have the updated files.
      Indeed, deploying can be quite a pain because there are so many little things to consider.
      Regarding the latest Django version on Railway, you need to add the runtime.txt file with your python version. Railway's default Python version is 3.8, however the latest Django version needs at least 3.10.

  • @md.musfiqurrahaman8612
    @md.musfiqurrahaman8612 4 месяца назад

    Thanks for this man❤️

  • @kisamehoshigaki-u1p
    @kisamehoshigaki-u1p 9 месяцев назад

    i learned how to work with django template by watching your awesome project , allauth package integration also great, your django deployment playlist also very helpful thanks, please do celery and rabbitmq with django

    • @ajudmeister
      @ajudmeister  9 месяцев назад +1

      Yes, this is on the roadmap! thanks

  • @JeffreyMintah-z6e
    @JeffreyMintah-z6e 9 месяцев назад +1

    This is good. When will you be doing a video that delves more into the backend stuff, like building APIs and the docker and kubernetes guys?😅

    • @ajudmeister
      @ajudmeister  9 месяцев назад +1

      Yea some of those concepts I will tackle in a future series, like building an API with the Django REST framework. Docker and Kubernetes are beneficial for sharing and scaling a project especially when working in teams and on larger complex projects, these topics I will probably cover a bit later down the line as they add complexity we don’t really need at the start.

  • @tboykelvin1865
    @tboykelvin1865 9 месяцев назад

    educative as always,thanks And

  • @nehmtech
    @nehmtech 2 месяца назад

    Nice content sir!

  • @binaryfire
    @binaryfire Месяц назад

    Great video. One question - why not run the migrations as part of your deployment script? Connecting remotely and running db migrations manually isn't great for automating deployments, especially if more than 1 dev is working on the app.

    • @ajudmeister
      @ajudmeister  Месяц назад +1

      yes absolutely, I am used to do it manually, but especially when you are not developing alone, running automatic migrations and other scripts is definitely the way to go.

  • @fernandoalvarez9434
    @fernandoalvarez9434 4 месяца назад +1

    Hi thanks for the video, I already deployed and can access my page from computers, tablets even my tv but not from iphone, it says 'Safari cannot find the page', do you know what could be the problem?

    • @ajudmeister
      @ajudmeister  4 месяца назад +2

      Hmm, my site works on safari. Safari has stricter security policies, so it might something related to CORS, DNS, SSL or some other configuration. You might also try to clear your browser cache or check if you are not using an old version.

    • @fernandoalvarez9434
      @fernandoalvarez9434 4 месяца назад

      @@ajudmeisterTY, i alreday made it work when prushasing and using a custom domain rather than the one railway gave me

    • @fernandoalvarez9434
      @fernandoalvarez9434 4 месяца назад

      @@ajudmeister and by the ways your videos are really good already recommded your channel to friends and coworkers keep it up

  • @easytechnology2023
    @easytechnology2023 2 месяца назад

    supperbbbbbb many thx

  • @FamilyTravelogue
    @FamilyTravelogue 7 месяцев назад

    Hi Andreas, the site I am building, users can add more than one photo handled by javascript. If I deplloy to AWS, would I still be able to follow your deployment series? further, I am really learning much from you. I actually finished your 2 series. I have added the profile edit and email notification htmx to my site.

    • @ajudmeister
      @ajudmeister  7 месяцев назад +1

      Hi, that’s great to hear! Yes, AWS is pretty much the standard for hosting static files and I made a video how to set it up.

  • @Coden69
    @Coden69 9 месяцев назад

    very good

  • @amine63404
    @amine63404 7 месяцев назад

    Perhaps I missed something but how you managed static files, are they automatically managed by railway ?

    • @ajudmeister
      @ajudmeister  7 месяцев назад

      No, for this you would need to install whitenoise. And if you have media files you need to connect to a media server. Check out my deployment series for more details.

    • @amine63404
      @amine63404 7 месяцев назад

      @ajudmeister I will definitely check that out, thank you.

  • @joshuaas1894
    @joshuaas1894 8 месяцев назад

    Hello, I have deployed a django website to railway but I haven't been able to serve my media files. The static files are working fine but the media files aren't
    Please can you help

    • @ajudmeister
      @ajudmeister  8 месяцев назад

      Hi, this could be because Railway doesn't allow to upload media files to their servers. You should use a 3rd party server to store media files such as cloudinary.

    • @joshuaas1894
      @joshuaas1894 8 месяцев назад +1

      @@ajudmeister thanks for the reply, I later sorted it out and it's actually cloudinary that I used.
      Everything is working perfectly now.

  • @coolgirlsharu
    @coolgirlsharu 9 месяцев назад

    my django web app dont have any database , im using in built django admin only , will it be okay to do deployment? please tell

    • @ajudmeister
      @ajudmeister  9 месяцев назад

      Sure you can deploy with the build-in SQLite database, however whenever you re-deploy the app you lose all the data you might have eg. your superuser.

  • @obaid2606
    @obaid2606 7 месяцев назад

    how did u create this .env file?

    • @ajudmeister
      @ajudmeister  7 месяцев назад

      Hi, have a look at the video where I explain them: ruclips.net/video/BO6O3I88mU4/видео.html

  • @FlutterPythoncombo
    @FlutterPythoncombo Месяц назад

    Hi, amazing tutorial! Thank you very much. I'm getting this error when trying to connect to the database. I would really appreciate it if you could explain why.
    raise e.OperationalError(str(last_exc))
    django.db.utils.OperationalError: [Errno 11001] getaddrinfo failed

    • @ajudmeister
      @ajudmeister  Месяц назад

      Hmm, this error could mean that Django can’t find the hostname of the database server. Is the database hostname correct? Could also be that the environment variables are not set properly. Can you connect locally to the database without problems?