Easily deploy a Laravel application with Docker

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 104

  • @latlov
    @latlov 4 роки тому +22

    1:35 $ cp docker-compose.yml docker-compose.prod.yml
    1:38 Adjust the nginx port to 80:80
    1:47 Harden mysql passwords!
    4:05 Deployment options: 4:20 rsync
    8:19 Just after you've uploaded your Laravel project to the src/ folder ... However you wanted to (rsync, git, ftp, shell, putty, cmder, bitwise, etc)
    9:06 $ docker-compose -f docker-compose.prod.yml up -d --build
    9:30 how to add the laravel user to the docker group
    10:23 Update the Laravel's .env file for database credentials, app domain, etc.
    11:10 Run the migrations with $ docker-compose run --rm artisan migrate
    14:40 Deploy with git
    17:45 Cloning Laravel project into the src/ folder
    18:09 Editing .env file
    19:10 Run composer install: $ docker-compose run --rm composer install
    19:23 $ docker-compose run --rm artisan migrate
    19:33 $ docker-compose run --rm artisan db:seed
    20:43 : Everybody wondering ... where is the domain setup, SSL let's encrypt, Redis, memcached, supervisor, ... part ?

  • @martins-ecke
    @martins-ecke 10 місяців тому +1

    Still a Premium Course in 2024 - I bought the course recently, worked through it and am VERY happy that I did:
    Everything it teaches is still valid, you will learn the basics and how to become comfortable with hosting/running your Laravel App through Docker.
    Thank you for making awesome content Andrew 👍👍👍

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

      is the course have all until adding domain name?

  • @mcvgs1780
    @mcvgs1780 4 роки тому +2

    For someone like me who has been itching to deploy my laravel projects your content has been a really good source of info.

  • @flipperiflop
    @flipperiflop 4 роки тому +26

    Would be nice to see a production-grade docker/kubernetes config, with some settings that are secured and optimized - or just some info of how to do it wrong in a production setup, and what kind of things to keep in mind - like for example having ports open only internally, or settings to make sure opcache is set properly.

  • @Arcwise
    @Arcwise 3 роки тому +3

    These Laravel Docker videos have been a lifesaver for me. I'm happily buying your course, thank you!

  • @ochienoeliud5723
    @ochienoeliud5723 Рік тому +1

    Very informative indeed! Clarity in your step-by-step flow makes the learning process easy to understand. I can now swiftly get my laravel projects to live env. Thanks alot Andrew🙏

  • @muhohojeremy4861
    @muhohojeremy4861 2 роки тому +1

    I love this, the kind of learning I salute like teaching from 0 to production. ❤.

  • @rkd-me
    @rkd-me 4 роки тому +10

    Andrew, cannot thank you enough!
    I have been playing recently with docker and your videos are the best, once again thank you and keep it up!
    BTW. do you consider any tutorials for Kubernetes?

  • @FaizanAnwerAli
    @FaizanAnwerAli 4 роки тому +35

    You missed few things for complex projects.
    1.) Deploy to actual domain.
    2.) SSL for that domain.
    3.) Socket connection.
    4.) Using SSL with socket connection.
    5.) Redis
    6.) Memcached
    7.) Digital ocean Spaces for reliable storage.
    8.) MySQL data will be lost once you bring docker down, how to solve that?
    I'm hoping part 2 to cover these problems.

    • @aschmelyun
      @aschmelyun  4 роки тому +28

      This was definitely just an introductory video, additional parts covering those items will be coming up!

    • @vaibhavdeokar7642
      @vaibhavdeokar7642 4 роки тому +1

      It would be great to see that info.....

    • @jaysonvacaro9345
      @jaysonvacaro9345 4 роки тому +3

      @@aschmelyun Looking forward to this. Nice tutorial though

    • @izclubcom
      @izclubcom 4 роки тому

      Great. Im waiting comming soon

    • @leejenn4779
      @leejenn4779 4 роки тому

      Hopefully can have a video to cover these.

  • @rudeadyet1992
    @rudeadyet1992 4 роки тому +5

    Thank you very much! Waiting for CI/CD bitbucket or GitLab pipelines for docker deploy! :D

  • @latlov
    @latlov 4 роки тому +10

    Thank you, Andrew! How about adding Let's Encrypt and domain? Or have already uploaded a video about it?

  • @k0mar12
    @k0mar12 3 роки тому

    That what i'm talking about, i have been spent so much time for looking great tutorial. Thank u so much

  • @oussamafahchouch6871
    @oussamafahchouch6871 Рік тому

    Thanks for the nice tutorial about how to easily deploy a laravel app with docker!

  • @JohnnyBigodes
    @JohnnyBigodes 4 роки тому +1

    This was the video I was waiting for... It is great... Thank you for this...

  • @christostsangaris4785
    @christostsangaris4785 2 роки тому

    Dude this is amazing! Great resource!

  • @AirCode7
    @AirCode7 Рік тому

    is there still this repo link, i love that you handled the composer and artisan containers, one thing that would change its that instead use nginx of server it self as service, if you have multiable sites

  • @bobbyiliev_
    @bobbyiliev_ 3 роки тому

    Cool to see my own answer on the DigitalOcean forum in the video 🎉

  • @DivDax
    @DivDax Рік тому

    Great explanation! Keep up the good work! 🙏

  • @MarcelloPato
    @MarcelloPato 4 роки тому +1

    Hi Andrew!
    Could you please make a video on how to build an image from production so I can push that to a repository?

  • @bhaidar
    @bhaidar 3 роки тому +1

    Hey Andrew, can you share how to deploy Laravel+Vue in a single docker file? Thanks

  • @simonangatia2398
    @simonangatia2398 2 роки тому

    11:29 docker-compose run --rm artisan migrate throws an error: ERROR: no such service: artisan

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

      In my case I had to use the name of the service you declared in the docker compose file so laravel.test or the container id. So the entire command looked like this: docker exec php artisan migrate

  • @jordanalbarracin3119
    @jordanalbarracin3119 3 роки тому

    Hello, in the course you are selling you have to make a reverse proxy to store several laravel applications on the same server, that is, with Docker?

  • @Hhtesh
    @Hhtesh 3 роки тому

    I have a question about the database.
    What is we want to move site to different server with existing database ?

  • @ejay4032
    @ejay4032 3 роки тому

    Thanks!!! This was extremely helpful

  • @paulisaris
    @paulisaris 4 роки тому

    Awesome tutorial, thanks!!

  • @sospeterwangai8278
    @sospeterwangai8278 4 роки тому

    Hello, when running docker-compose locally is doesn't set laravel sessions, also the cookies can't be set. The only cookie available is the code editor's (phpstorm). What would be the issue

  • @tecsmith_info
    @tecsmith_info 4 роки тому

    Excellent tutorial, very well done.

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

    Man, awesome tutorial. Thank you. I'm following every step you take, however, when I try to instal dependencies with composer I get this:
    In Filesystem.php line 260:
    /var/www/html/vendor does not exist and could not be created
    What am I doing wrong?

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

      run
      docker-compose run --rm composer install

  • @chanakakasun7843
    @chanakakasun7843 2 роки тому

    Andrew, can you maka a video for file uploading in laravel within docker container.It is hard to understand how to view uploaded files and how to create symlink correctly.If you can make a videos it is helpfull

  • @amrullahdev8895
    @amrullahdev8895 2 роки тому

    wait , so we dont have to make the laravel ,nginx , mysql as an image , and push to docker hub , then pull to the server to automacly run ? , just like put on github , pull on vps server , then do the rebuild like on the local ??

  • @ckwcfm
    @ckwcfm 2 роки тому

    Any chances you can do a same video but using docker swarm?

  • @timfranklin4724
    @timfranklin4724 2 роки тому

    Where can I find your docker-compose file?

  • @zayediffadmahdi4194
    @zayediffadmahdi4194 4 роки тому

    can you make video using OS Ubuntu server in aws, and make deploy laravel app, nginx, and mysql in docker

  • @SniperTunisian2011
    @SniperTunisian2011 4 роки тому

    What about having .env file that contains containers exposed ports for both dev and prod environments?

  • @ultimate-z
    @ultimate-z 2 роки тому

    Hey there, that would be very kind of you if you share docker-compose file.

  • @victorchinonsougwu1359
    @victorchinonsougwu1359 2 роки тому

    Thank you Andrew for this, but for deploying to server can git-ftp work for that??

    • @aschmelyun
      @aschmelyun  2 роки тому +1

      I'm pretty sure you can use git-ftp, I'll have to look into it deeper though!

  • @VishalRana-ix9ry
    @VishalRana-ix9ry 2 роки тому

    I want to do this but with Ubuntu as core image then nginx and php on it which run the container need help

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

    where do you see the database ? on local ?

  • @LostinTheTube
    @LostinTheTube 4 роки тому +1

    Great tutorial!

  • @levitica2017
    @levitica2017 Рік тому

    So clear! Thank you

  • @alexios4392
    @alexios4392 4 роки тому

    How to automically do migrations with Docker?

  • @rajivguptaggs
    @rajivguptaggs 4 роки тому

    Wonderful thanks mate.

  • @ahmedhdeawy
    @ahmedhdeawy 4 роки тому

    Thank you so much for this video

  • @vaibhavdeokar7642
    @vaibhavdeokar7642 4 роки тому

    Sir I have a question
    If we do docker down then it will shut down the container the what happens to the database ?

    • @latlov
      @latlov 4 роки тому

      If there are no volumes, database info is gone.

    • @arsaphone
      @arsaphone 4 роки тому

      @@latlov use volume

  • @cultureofnepal2024
    @cultureofnepal2024 4 роки тому

    Hi Andrew, can you make this system with tools using deployer or capistrano or using github actions.

    • @aschmelyun
      @aschmelyun  4 роки тому +2

      That's coming soon! I'll be doing a whole video on deploying with Docker and CI/CD systems.

    • @cultureofnepal2024
      @cultureofnepal2024 4 роки тому

      @@aschmelyun thanks andrew.

    • @cultureofnepal2024
      @cultureofnepal2024 4 роки тому

      Is it possible to make this repository public?

  • @swangiful
    @swangiful 4 роки тому

    Excellent stuff!

  • @axay_gadekar
    @axay_gadekar 4 роки тому

    Awesome.. just what i wanted.

  • @tdias25
    @tdias25 4 роки тому

    your editor is phpstorm? if so, which theme is that?

    • @aschmelyun
      @aschmelyun  4 роки тому +1

      Yes, it's PHPStorm! And the theme I am using is called Material Theme UI with the Atom One Dark color scheme.

  • @meilyandevriyantimor5492
    @meilyandevriyantimor5492 4 роки тому

    Hi, @Andrew Schmelyun. Can you make a video that deploys the Laravel app using Nginx and PHP-fpm in one Dockerfile and MySQL to another Dockerfile in the production environment? I had been researching about it and tried to make my own Dockerfile, but wanna see from your perspective and your opinion. Nice video

    • @vaibhavdeokar7642
      @vaibhavdeokar7642 4 роки тому

      Can you pass on that setting I am also working on that
      Like repo link

  • @mdickymahfudin7201
    @mdickymahfudin7201 4 роки тому

    Hi, how to laravel schedule:run in docker?

    • @aschmelyun
      @aschmelyun  4 роки тому

      You could create a cron job on the server to run docker-compose run --rm artisan schedule:run every minute and it should give you the same outcome.
      I'll make a note of this use case and create a follow-up video in the near future.

  • @armiiiin
    @armiiiin 2 роки тому

    Great Video!

  • @Defelper
    @Defelper 2 роки тому

    Can you show us how we can deploy with heroku?

    • @aschmelyun
      @aschmelyun  2 роки тому +1

      Sure thing! It's a bit of a different process, but I'd be happy to try and show it off in a future video.

  • @kamleshpaul414
    @kamleshpaul414 4 роки тому

    i need to install puppeteer as welll

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

    when you were typing commands at the bottom of the screen, i just want to tell you. I could still see them, next time to be sure to hide whatever you are typing because people might learn what you are typing.

  • @murphishouse
    @murphishouse 2 роки тому

    Github repository please!

  • @axay_gadekar
    @axay_gadekar 4 роки тому

    You could just setup bare git repo on server so we don't need to pull every time..

    • @aschmelyun
      @aschmelyun  4 роки тому +1

      Definitely! For anyone interested in that, this guide is super helpful for setting up hooks on a server: hackernoon.com/deploy-website-to-remote-server-using-git-da6048805637

  • @mangasprai
    @mangasprai 4 роки тому +1

    "easily"... looks pretty hard to me

  • @subhrajit372
    @subhrajit372 4 роки тому

    hi, i am building a website with laravel, it implements video calling and chatting, and to use socket.io i have to use node server in my project, but i am confused about how to deploy the project in a platform like aws or digital ocean?

  • @DaniSpeh
    @DaniSpeh 4 роки тому

    NIce, but one app on one droplet is a waste of money and resources, imo. A multi-app solution would be nice (inc. DNS, reverse-proxy ?)

  • @maksymdudyk1718
    @maksymdudyk1718 3 роки тому +1

    How awesome!

  • @ojiepermana
    @ojiepermana 4 роки тому

    deploy with kubernetes please 😀

  • @memack101
    @memack101 4 роки тому

    Thanks man

  • @HakkiKonu
    @HakkiKonu Рік тому +1

    do not use rsync in your professional work life. instead learn ci/cd workflow

  • @yuniorespinal9926
    @yuniorespinal9926 4 роки тому

    Awesome thanks

  • @gyana111
    @gyana111 2 роки тому

    Thank you

  • @alexfury8755
    @alexfury8755 3 роки тому +1

    Amazing

  • @ammlyf
    @ammlyf 4 роки тому

    Thanks

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

    Perfect

  • @satheshkumar5906
    @satheshkumar5906 3 роки тому

    useful

  • @veoquenoesunproblema
    @veoquenoesunproblema 3 роки тому

    Thanks for the video but it didn't work at all anything of what you have done. I literally follow your first video and this second video and nothing.

  • @josmardelposo7543
    @josmardelposo7543 Рік тому

    Github repository please!