Easily deploy a Laravel application with Docker

preview_player
Показать описание


In this 21 minute video, I'll show you how to easily deploy a Laravel application using Docker and two separate methods to get source files on a server.

You'll learn how to:

- Set up Docker and Docker Compose on a remote Ubuntu server
- Send files to a server using rsync
- Use git and GitHub to commit, push, and pull files to a remote server
- Run docker-compose on the remote server to deploy your app

Thanks Patreon supporters!
- Sam Ross
- PK
- Melissa Kipp

Рекомендации по теме
Комментарии
Автор

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 👍👍👍

martins-ecke
Автор

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

Arcwise
Автор

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

mcvgs
Автор

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.

flipperiflop
Автор

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 ?

latlov
Автор

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?

rkd-me
Автор

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🙏

ochienoeliud
Автор

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

JohnnyBigodes
Автор

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

muhohojeremy
Автор

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

kmar
Автор

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

latlov
Автор

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

oussamafahchouch
Автор

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

rudeadyet
Автор

Great explanation! Keep up the good work! 🙏

DivDax
Автор

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

MarcelloPato
Автор

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.

FaizanAnwerAli
Автор

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

bobbyiliev_
Автор

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

bhaidar
Автор

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

SniperTunisian
Автор

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

AirCode