Deploying an App to Fly.io | SvelteKit example app Dockerize and launch!

Sdílet
Vložit
  • čas přidán 11. 05. 2023
  • This was really fun and can't wait to explore Fly.io more! In this video I take a small example application (the file saver app link below) and Dockerize it. Then I walk through the steps necessary to deploy it to Fly.io. Definitely check out Fly.io if you haven't heard of it! I hope you find this helpful!
    LLM Training Data Creator using SvelteKit, Fly.io, Tigris, and Openai:
    • LLM Training Data Crea...
    Tigris + Fly.io CRUD Object Storage Video:
    • Video
    My channel membership is live check it out here!:
    / @consultingninja
    Membership perk video:
    • I launched a chatbot w...
    Need help? visit www.consultingninja.tech
    Check out my channel ‪@ConsultingNinja‬ for more videos like these.
    Source code for starting app:
    github.com/consultingninja/fi...
    Gist containing Dockerfile:
    gist.github.com/consultingnin...
    Fly.io docs:
    fly.io/docs/
  • Věda a technologie

Komentáře • 25

  • @ConsultingNinja
    @ConsultingNinja  Před 4 měsíci

    The dockerfile MUST live in home directory (alongside your package.json) of the application (what I meant when I said "inside of our source directory") NOT in /src. *update* fly is now labeling the app a nodejs app since it is relying on node js inside of the container. It still deploys correctly. One other note is that you may run into cors issues with your form actions and api routes in dev mode this has to do with localhost, if you deploy a production build not going to be an issue, if you NEED to use dev then you have to define your config in vite.config.js to use 0.0.0.0 instead of localhost. I hope this helps!

  • @adhec
    @adhec Před rokem +3

    Will keep around for another Flyio tutorial with SvelteKit, thank you!

    • @ConsultingNinja
      @ConsultingNinja  Před rokem +1

      I will add that to my list of videos. Thank you for watching!

  • @superspamtube7464
    @superspamtube7464 Před rokem

    Really cool that you can pick a location... I saw Spain there, nice. Great Video!

    • @ConsultingNinja
      @ConsultingNinja  Před rokem

      Yes, and very generous free tier. So far the most generous I have found. You can also add volume storage very easily. This is VERY promising! Thank you!

  • @jordanchristley1306
    @jordanchristley1306 Před rokem

    great vid

  • @meka4996
    @meka4996 Před rokem

    My Docker image failed to run. I am using pnpm, node18.16.0... Then I found out "--open" at the last line of your Dockerfile causes the problem. Thanks

    • @ConsultingNinja
      @ConsultingNinja  Před rokem +1

      Ok, awesome! Glad you figured that out. You can also setup the server to run by modifying the Vite config file and setting the server prop with your choice. Thank you for watching!

  • @guzidev
    @guzidev Před rokem

    It looks super cool 🎉, are prices better than aws?
    Can you do a video doing the same process in aws? Maybe with fargate

    • @ConsultingNinja
      @ConsultingNinja  Před rokem +3

      I am still comparing prices. But I will let you know when I can say for sure. I will say that Fly.io doesn't have a time limit on their free tier like AWS and you can keep a full stack app there according to their current documentation. I have TONS of videos I have in line. One of them yes is deploying to AWS. As far as deployment videos I have Linode up next (which was just purchased by Akamai) and then AWS. I will add a poll to see if should switch those. Thank you for watching and the feedback!

    • @guzidev
      @guzidev Před rokem +1

      @@ConsultingNinja nice, thank you I appreciate your support

    • @ConsultingNinja
      @ConsultingNinja  Před rokem +1

      You are very welcome I am really here to help!, be sure to vote in the poll (community section of my channel) to make sure your voice is heard!

    • @jatidevelopments
      @jatidevelopments Před 8 měsíci

      @@ConsultingNinja Do you have any Update on this? How is the pricing compared to AWS?

  • @scott_itall8638
    @scott_itall8638 Před 8 měsíci

    Could you do a PocketBase and Sveltekit Docker run through?

  • @uch195
    @uch195 Před 9 měsíci

    I followed this video and many guides but as soon as i do fly launch it says it detected an Node.js application instead of Docker Image, any way to get around to that?

    • @ConsultingNinja
      @ConsultingNinja  Před 9 měsíci

      I have not run into that. You have followed the example EXACTLY as I showed and it is not detecting the docker file? Are there error messages?

    • @CG12358
      @CG12358 Před 8 měsíci

      Same, I followed EXACTLY and it's doing the same thing

    • @ConsultingNinja
      @ConsultingNinja  Před 8 měsíci

      Are you getting error messages?

    • @CG12358
      @CG12358 Před 8 měsíci

      @@ConsultingNinja No error messages, just only NodeJS detected. Looks like it's a common problem online. This video was published 5 months ago, so maybe has something to do with a lot of the changes made to SvelteKit over the past few months.

    • @ConsultingNinja
      @ConsultingNinja  Před 8 měsíci

      I will try to take a look at that soon.

  • @greendsnow
    @greendsnow Před rokem

    very nice. can i change the domain name too?

    • @ConsultingNinja
      @ConsultingNinja  Před rokem +1

      Yes, of course you can. If you want to use a custom domain you will have to allocate an IP. They have so many people using the service now they use shared IP's now by default (routing with hashes and keys internally) and if you want your own IP you just have to enter a command. You can allocate an IPv4 address by running the following:
      fly ips allocate-v4
      fly.io/docs/getting-started/multi-region-databases/#allocating-an-ip-address