Chris Fidao
Chris Fidao
  • Видео 21
  • Просмотров 152 125
Leveling up Laravel deployments: Unlocking optionality
This is how I like to do deployments for Laravel applications.
This involves using a CI pipeline, instead of (blindly) deploying based on git webhooks.
There's a lot of reasons why deployments can get bogged down and, frankly, suck. Let's see how to get unstuck by adding some process to our deployments.
The two main things that buy you optionality are:
1. An approval process
2. A deployable build artifact
These gives you lots of options! You can prevent bad code from going to production with an enforced approval process. When a build artifact, you can run your code from different points in time (without having to worry about nodejs dependency issues), test out other platforms, build containers,...
Просмотров: 1 932

Видео

Surviving Homebrew: 9 tricks to master (and debug) Brew
Просмотров 8859 месяцев назад
We become Brew power users, learning 9 tricks to better make use of Brew, and debug issues that come along with using it. We laugh, we cry, we poke fun. Everyone has a good time. ⌚️ Timestamps 00:00 Intro 00:30 Where is everything? 01:15 Brew Services 01:51 Brewfile 02:28 Brew hell: Installing/Updateing 03:44 Brew Doctor 04:17 Permissions 05:08 Brew Mas 05:47 Brew (un)link 06:35 Brew Edit 7:07 ...
The secret behind FrankenPHP: Will it revolutionize PHP?
Просмотров 43 тыс.9 месяцев назад
How to use FrankenPHP to ship your PHP/Laravel application, in a way that's potentially revolutionary and definitely pretty magical. FrankenPHP is a PHP application server, written in Golang. It's a module for the Caddy web server. Behind the scenes, Franken acts as a PHP SAPI (the thing that site between your web server and your PHP application). It manages handling PHP processes that result f...
Public routes blow up Laravel (in a weird way!)
Просмотров 16 тыс.10 месяцев назад
Public routes can grind your Laravel app to a halt. See why and how to fix it! A public "asset" route is one created dynamically in your Laravel code base, but serves “static asset” such as an SVG or JS embed meant to be used by your users/customers. However this means any traffic your customers get, you get (since they’re serving up YOUR asset on their site)! There’s two ways this breaks Larav...
Run Laravel in a subdirectory with Nginx (full, working config)
Просмотров 2,7 тыс.10 месяцев назад
We get Laravel working in a subdirectory, using Nginx configuration. This is great for multiple Laravel installations, or when you just have a second Laravel running inside of any subdirectory. The Laravel code base is not literally in a subdirectory of a parent code base, instead we just use Nginx routing to make the URL routes behave as if it is. ▶ The original content for this article is her...
Nginx Wildcard Subdomains for Multi-Tenancy (ssl + better config)
Просмотров 3,1 тыс.10 месяцев назад
We use letsencrypt (certbot) with the CloudFlare DNS plugin to generate a fee, auto-renewing TLS certificate to use with Nginx. Then we configure Nginx to use that TLS certificate and create a configuration to support multi-tenancy in our applications. We use a special configuration to capture the value of the subdomain so we can pass it off to our PHP application (or do anything we want, like ...
SSL Certificates in 30 Seconds
Просмотров 1,9 тыс.10 месяцев назад
See how to install, setup, and configure LetsEncrypt (certbot) with Nginx to get an SSL certificate in something like 30 seconds. This will help you get and configure an TSL certificate that auto-renews itself via LetsEncrypt - you never have to think about it again! When you install certbot, it will add a systemd timer. This timer periodically checks if the certificate needs renewing, and if s...
Production Ready Nginx, fixing Nginx's Default Configuration
Просмотров 19 тыс.11 месяцев назад
We take Nginx's default configuration and ensure we properly setup caching and security settings so we can serve our applications under the most idea circumstances. This makes use of H5BP's Nginx Configuration to quickly and easily get Nginx setup for production. H5BP: github.com/h5bp/server-configs-nginx ⌚️ TIMESTAMPS 00:00 Intro 00:26 Nginx’s Problematic Defaults 02:30 Fixing Nginx w/ H5BP 03...
Understanding and Debugging Nginx Configuration
Просмотров 1 тыс.11 месяцев назад
We take a tour of Nginx configuration to help you figure out and debug issues. We see where configuration is, talk about configuration conventions, seeing how to view loaded Nginx, test Nginx configuration, and finally understand a basic server configuration (to host your sites)!. Keep an eye out for future, more in-depth videos, especially regarding Nginx for Multi-tenant application setups (e...
Shipping Docker Course (re)Introduction
Просмотров 39011 месяцев назад
I'm updating the Shipping Docker course ahead of Black Friday in 2023. courses.serversforhackers.com/shipping-docker This is my most sucessful course! It's also the oldest! It's still super relevant tho - luckily Docker hasn't changed under my feet. I've made a bunch of updates for 2023 and I talk a bit about why I didn't feel the need (at all!) to completely redo the course! If you want to hea...
Local dev setup for multi-tenant applications
Просмотров 2,2 тыс.11 месяцев назад
I'm doing some videos on setting servers up for multi-tenant applications. This means letting each customer/user have their own subdomain within your application. To start, we setup our local dev environment to use dnsmasq nginx to: 1. Map the domain used to a directory (where our code lives) 2. Setup specific apps to run with ANY subdomain so we can test a multi-tenant setup locally ⌚️ Timesta...
The surprising ways Nginx try_files actually works
Просмотров 1,7 тыс.Год назад
We see how Nginx's try_files directive actually works. It seems super simple at first, but there are configuration settings that affect how it works! We'll see what other configuration we should care about, and how other Nginx location blocks can be used in conjunction with try_files. ⌚️ Timestamps 00:00 Intro 00:08 URI and the Document Root 01:01 What try_files does 02:27 Other location blocks...
PHP is Weird, Stateless, and Beautiful
Просмотров 22 тыс.Год назад
HTTP is stateless. Most languages and frameworks are not! PHP, however, is a weirdo. It was created for HTTP! Unlike other languages, PHP rebuilds it's entire world on each request. This is a beautiful thing. ⌚️ Timestamps 00:00 PHP is Stateless 00:09 HTTP is stateless, too 01:22 Comparing Languages 04:28 The People's History of PHP 05:22 Ancient PHP looked like this 06:41 What's your point? 07...
Nginx Unit changes how we host PHP (& Laravel)
Просмотров 21 тыс.Год назад
Nginx Unit changes how we host PHP (& Laravel)
How Nginx and PHP-FPM turn a web request into code
Просмотров 4 тыс.Год назад
How Nginx and PHP-FPM turn a web request into code
Configuring and Troubleshooting PHP-FPM
Просмотров 4,8 тыс.Год назад
Configuring and Troubleshooting PHP-FPM
What to do when you hit 502 or 504 gateway errors on your Laravel app
Просмотров 2,9 тыс.Год назад
What to do when you hit 502 or 504 gateway errors on your Laravel app
I recreated GitHub Actions on Fly
Просмотров 278Год назад
I recreated GitHub Actions on Fly
Setting your $PATH variable for Laravel development
Просмотров 369Год назад
Setting your $PATH variable for Laravel development

Комментарии

  • @NFM-nb7dl
    @NFM-nb7dl 14 дней назад

    pls more content about it

  • @zarmeza1
    @zarmeza1 26 дней назад

    man, thanks alot. i was using chatgpt, and stuck at 6:31

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

    Thank man, this topic isn't cover much on the internet

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

    PHP does not need revolutionize. PHP is life as it is.

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

    Thanks for video! Could you make some performance tests? How much FrankenPHP is strong for huge loading?

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

    Great video ! We are using Symfony at our company and I strongly recommand viewing worker mode of Frankenphp, which is IMO the most important point of this tool. Just make sure that your app support shared memory model ;) (a tool called "phanalist" helped us on that tasks to switch to the shared memory model for our apps)

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

    Storage? Where will it store uploaded files?

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

    I mean, ok. This was a useful intro to what's possible but this definitely doesn't count as a "how-to". I'm also not sure you're right about Caddy being slower than Nginx.

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

    Hi, I work on windows machine, and have herd installed but when i try to access subdomain, it shows "This site can’t be reached" ?

  • @Vortigon
    @Vortigon 3 месяца назад

    Good video but you completely forgot to include anything about debugging which was supposed to be the point of the video

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

    you can use cloudflare for SSL also ?

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

      certainly, and that pairs well with their origin certs so the connection is encrypted end to end!

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

    Great explanation. No fluff. No boilerplate cluttering the examples.

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

    Great content. Keep 'em coming please!

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

    I already have nginx server on my ubuntu 22.04 running for several project, I want to try nginx unit for my newest project, if I install this nginx unit, would it break my nginx and all related website?

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

      i don’t think so - but i’d experiment in a docker container first.

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

    I remember yhe good old times when it was considered bloated if the executable exceeded a few megabytes in size :) oh how the turntables have been turning ;D

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

      definitely not my favorite part of it. Interestingly golang can pretty easily get large too!

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

    There is no revolution or magic here to be found! It is not worth to study how this works internally, reading documentation for hours etc. Use docker and apache,nginx. Keep it as simple as possible.

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

    Franken php to bundle backend, and deno (hopefully bun too) to bundle and deploy frontend. Maybe someone can come up with installer script for windows, shipping products is going to be smooth as f in future.

  • @paulobitfranca
    @paulobitfranca 6 месяцев назад

    Hi. I'm trying to run the frankphp in a different port. Is it possible to specify a port different from default (80) on run it? Thanks

    • @fideloper
      @fideloper 6 месяцев назад

      unsure! did you figure that out? (in their docs?)

    • @paulobitfranca
      @paulobitfranca 6 месяцев назад

      @@fideloper I didn't find anything. I forgot to mention... I'm talking about the standalone binary, not about the docker version

  • @RuhshadDaruwalla
    @RuhshadDaruwalla 6 месяцев назад

    Awesome, neat and easily put across! Can you make a video auto ssl for external domains, something what Shopify does?

    • @fideloper
      @fideloper 6 месяцев назад

      i’d use cloudflare 😂 - check out “cloudflare for saas”

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

    Thanks for the great tutorial. I just setup Laravel with Tenancy package, but I get a different behavior on Herd; the tenant app loads the landlord home page. Maybe this is as a result of the folder structure on Laravel 11. Edit: This doesnt happen in laravel10. My guess is because the folder structure is exactly as on the documentation of the tenancy Package and I followed all steps as supposed :) Thanks once more for the great video.

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

    Why that door moved from right side to left side 😆😆

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

    How would the Laravel task scheduler be setup ? Will it leverage the existing binary or will you need to install PHP on the host machine and setup a cronjob?

    • @fideloper
      @fideloper 6 месяцев назад

      you can use the existing binary to run any command

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

    docker run --rm -v $PWD:/app -p 443:443 dunglas/frankenphp php artisan sapi ERROR Command "sapi" is not defined. How come you did not get this error ?

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

    Excellent!!!

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

    Required reviewers are only available for public repositories.

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

      kinda lame, but I guess in theory if you use GH for business…pay for it!

  • @Mohamed.Shosha.
    @Mohamed.Shosha. 7 месяцев назад

    Is it best than swoole ?

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

      nothing is best or worst... its a very shallow way of thinking... you should ask, best for X or Y

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

    the wink about 6mins in got a chuckle out of me

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

    Crazy. I was just about to use Nginx Unit with PHP inside one container and now I see this.

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

      it’s worth experimenting to see which you like better! Since Franken uses caddy, i think you get more configuration (it’s a full web server, i think Unit has less features)

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

    Nice explanation

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

    What about logging and other stuff when you build the binary ?

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

      they get spit out through the processes stdout, which you can direct to a file or ship to whatever logging mechanism you want (this is standard for non-php things, php was always the weirdo for really only having a file-based option)

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

    This is awesome!

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

    Took me a day till i found this

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

      glad it was helpful!!

  • @MunnaAhmed-t1t
    @MunnaAhmed-t1t 8 месяцев назад

    Just awesome explaining.... You're rocks

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

      Thank you so much 😀

  • @Bob-tx7hv
    @Bob-tx7hv 8 месяцев назад

    finally even PHP can suffer from a complex zero downtime deployment - thanks to single binaries.

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

      ohhh interesting, what’s the complexity? what’s different from other deployment methods?

  • @seeds_of_growth-yi5gx
    @seeds_of_growth-yi5gx 8 месяцев назад

    I think putting it architecturally side by side with nginx + fpm could provide clarity, thanks for sharing, cheers!

  • @seeds_of_growth-yi5gx
    @seeds_of_growth-yi5gx 8 месяцев назад

    how does it compare with preloading, JIT...etc ?

  • @seeds_of_growth-yi5gx
    @seeds_of_growth-yi5gx 8 месяцев назад

    how do u deal with pecl extensions? that are not listed in the bash file ?

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

      You can set up the mentioned envs. With it, you can specify a minimal list of your extensions. Notice, that they use static-php-cli to build the static PHP. FrankenPHP, as its name suggests, is just tailored of various components.

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

    i wanted to ship a mysql server as well , does it bundle that as well?

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

      this isn’t a whole server, nope! Think is this as just rubbing your app code, no database or anything else

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

    When I am looking at any web stuff I can't believe that it is a binary code. It is super slow and absolutely religious by it's nature. While it is for the most part just an implementation of a prefab concept with a declarative language + some language that is targeting simple projects (getting problematic later). And overall everything web purposed is very similar to a game engine scope. I would expect true revolution for web with something like web-engine with specific IDE and editor. Game engine is an example of how you have an environment that is ready for all sorts of typical stuff and solutions for them in one place. And you don't have to remake everything if you just want to replace a physical engine or rendering pipeline. In few words: to have an actual architecture and not just bunch of unrelated stuff glued together hoping for the best. But I am quite delusional about web as I don't like browser and websites in the first place.

  • @gssj-o8p
    @gssj-o8p 9 месяцев назад

    Hello my name is Guilherme I'm from Brazil, I'm interested in your course, do your videos have subtitles? With subtitles in English I can understand almost anything, without subtitles is a bit harder...

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

      they don’t, but I should see if I can update them 🤔

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

    I've recently implemented my CI pipeline within AWS itself.. I noticed you didn't even mention AWS as an option yet you mentioned 6 or 7 others.. you're making me doubt my choices now.. is AWS for CI not a good idea?

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

    I'm currently having this problem and this video solves it. Thank you for the great video and great explanation!

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

    C.I. it`s a art! 🤓

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

    I like your style, however your artifact has compiled built code (with npm packages), that was created via a node version. You stated that you can go back and not have to worry about NPM. This is not totally true as you will still need to deploy that artifact into an environment which is able to run in (a different NPM or node version may still make it fail). Clearly there are ways around this - like using a docker build file, making sure that is tracked as well. But then this also means you know the code will run on that tagged image version (correct NPM and node versions) your artifact though speeds up the reverting to an old build and WORST.. a package going offline so you can't install it again. Again only a small point, I don't use artifacts enough at the moment and will be moving to this. Approval stage is also great, to often code goes out that shouldn't. However I do also employ protected branches, so merge requests must be completed with a reviewer. The advantage you have, is that your test / build stage has generated an artifact, that is then a lot faster to deploy. Keep up the great content.

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

      thanks! In this case (not all cases for sure) you already have built the static assets so you probably don’t need node again in production to rebuild all those assets. Of course if you also run some node process alongside your laravel app, then you’ll need node in production as well.

  • @jit-r5b
    @jit-r5b 9 месяцев назад

    Your last chapter reminded me of people, and perhaps me the most, spending hours upon winning two milliseconds in context of nginx vs caddy, when a relationship query is taking 500ms 🤣🤣

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

      Don't forget the folks who always struggle with the auto-cert with Nginx.

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

    Is the deploy only after review only available in Enterprise GitHub or is the setting something I am missing in our organization account?

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

      I believe it’s available on public repos or private paid org repos (the environment feature, that is). See the note here: docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment

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

      @@fideloper it looks like on my plans " If you are on a GitHub Free, GitHub Pro, or GitHub Team plan, required reviewers are only available for public repositories. " still working on some ways to add this for our small shop. Loving this new series of videos by the way.

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

    what is this value "$GITHUB_SHA"?

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

      that’s the git commit sha (a git thing, not specific to github)

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

    But I mean. Docker already is something you use to be able to deploy things in an easier way. If I have a dockerized application I can deploy it to any cloud environment like aws, azure etc with docker integration. I don't see the point

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

    Chris: "Does anyone use Travis CI anymore?" Me: 🤣 Good stuff!

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

      and no one’s feelings got hurt! probably!