Create a local Laravel dev environment with Docker

  Рет қаралды 199,673

Andrew Schmelyun

Andrew Schmelyun

Күн бұрын

Пікірлер: 314
@EzekielOladejo-f1u
@EzekielOladejo-f1u Жыл бұрын
This is probably the only tutorial I have seen on dockerizing a Laravel application that is straight to the point and easy to understand. Thanks Andrew!!
@aschmelyun
@aschmelyun Жыл бұрын
I'm glad you liked it, that means a lot to me! You're welcome!
@gordonrenfrew3632
@gordonrenfrew3632 4 жыл бұрын
Thanks for this, I've been jumping around articles/videos and have ended up being tied in knots trying to get this to work on my local comp. This was a solid run through for getting up and running without getting too bogged down and it was lucid in its approach - additionally most other tutorials seem to skirt over the server config which you went through here. I rarely comment on YT videos but when i do it's to tell you simply that you deserve to have an excellent day.
@resilientbit
@resilientbit 4 жыл бұрын
That's how a tutorial should be. To the point & not a single second wasted. Awesome! 👍
@GKSchattenjaeger
@GKSchattenjaeger 4 жыл бұрын
Sir, your guide was clear and concise, it provides a perfect starting point for those who learn easier from an audio presentation (and not only). Thank you.
@compelledcatholic6341
@compelledcatholic6341 Жыл бұрын
I know I'm commenting on an older video, but I just wanted to say thanks. This was very helpful. I thought I would stick my toes in the PHP waters just to check it out. I was struggling to find a good way to set up a dev environment without setting up a whole stack locally... not to mention, that it could then be the start point for a production branch (I found that video first). I watched dozens of videos that just referred to something like this or just glossed over the whole process. This video plus your deployment video completed the picture that I was missing in my mental model, with all the nuances of docker and compose to tie a bow on it.
@KristherLouisVidal
@KristherLouisVidal 5 жыл бұрын
The best video on docker hands down! Please make a followup tutorial on how we can connect sequel pro with mysql and custom domain mapping.
@aschmelyun
@aschmelyun 5 жыл бұрын
You got it!
@aschmelyun
@aschmelyun 5 жыл бұрын
In case you haven't seen it, it's out now! kzbin.info/www/bejne/pauuqYqppM-MgJY
@deepeshdhakal7476
@deepeshdhakal7476 4 жыл бұрын
thank you this worked like magic. Not only learned how to make laravel work but also setting up webserver in general was a great learning experience.
@laizenwar
@laizenwar Жыл бұрын
This is exactly what I was looking to know how to do. Thanks for the tutorial. Straight to the point
@aschmelyun
@aschmelyun Жыл бұрын
Awesome, I'm glad it helped! If there's any improvements I could make to this video since it's a bit old now, feel free to let me know!
@hassanawodi5888
@hassanawodi5888 5 жыл бұрын
One of the best tutorial on this! Well done. Straight forward and on point.
@Mostaqmahmud
@Mostaqmahmud 5 жыл бұрын
Best one....best one...best one....!!!! I didn't get any clear understanding video like this. Thanks... Love you man... ❤
@bricxcarasco4921
@bricxcarasco4921 4 жыл бұрын
This is a great tutorial man, it's very clear and easy to understand. Keep it up sir, from the Philippines.
@hencoburger
@hencoburger 4 жыл бұрын
This was awesome! Helped me allot to get things up and running quickly.
@FunkyToe369
@FunkyToe369 5 жыл бұрын
Could you explain the purpose of the SERVICE_TAGS and SERVICE_NAME? I don't see it listed in the mysql docker hub so I am not sure what it does.
@AliasdHacker
@AliasdHacker 3 жыл бұрын
Well done, and very much appreciated. I just started a php project for the first time in about 10 years, this got me up and running very fast.
@jahedhmahmud1448
@jahedhmahmud1448 5 жыл бұрын
amazing tutorial, good pace to keep up with and just the right amount of information on every thing that is done (allowing us to google for further information if needed). Excellent keep up the great work!
@winter-survivor
@winter-survivor 4 жыл бұрын
You rely on having a PHP installation on the host machine to get Composer packages instead of installing Composer on the desired container via Dockerfile. Is this the recommended practice? Thanks for the tutorial, very helpful.
@njtuts5818
@njtuts5818 2 жыл бұрын
Brilliant presentation ......................... Thanks Andrew
@tannercampbell
@tannercampbell 5 жыл бұрын
Great Video Andrew!! Been looking for a great video Laravel setup in Docker and this was it!
@dorsetdroneguy5804
@dorsetdroneguy5804 4 жыл бұрын
Exactly what I was looking for. Thanks
@maurotrotta1370
@maurotrotta1370 3 жыл бұрын
Thanks Andrew! It was exactly what I was looking for!
@tannercampbell
@tannercampbell 5 жыл бұрын
@Andrew Schmelyun Do you know of a way to install composer directly inside the docker environment, instead of relying on the local machine version of composer to build the new larval project instance?
@pauloafonsop.a1146
@pauloafonsop.a1146 4 жыл бұрын
I don't think this is a good thing... because I think you have to configure your environment in a distinct moment that you install / work with your versioned laravel project... you have to be able to download the laravel project at any moment of the project development, using for example a git clone ..., mainly when your project is already created and your environment is already configured and stable. So first of all you configure your docker-compose to build your enviroment, and then, in a paralel way, you create your laravel project. After that, whenever somebody joins in your team, that person clones your your laravel git repository and then build and up your docker environment. If you put the command to install a new laravel project using composer inside your docker, whenever you build your container you create a new laravel project, that I don't think this is a good idea. Your docker-compose is to you create and up your environment...
@chrisdedavid1860
@chrisdedavid1860 2 жыл бұрын
4:00 I wish you had explained "volumes:" a bit more. I don't understand what that is defining, and why you set those 2 directories.
@imazumder99
@imazumder99 3 жыл бұрын
Thank you so much for this video. Easy to understand. Short and to the point.
@AkeelAmeen
@AkeelAmeen 3 жыл бұрын
Great tutorial, Simply explained! Thank you for this
@tictechstory7979
@tictechstory7979 2 жыл бұрын
This is what I am looking for, Great work Man👏
@stephenkaruku8384
@stephenkaruku8384 2 жыл бұрын
Thankyou man...this video is exactly what I was looking for
@luongkhang1462
@luongkhang1462 2 жыл бұрын
Thank you so much for this. Even watching your clip it cost me whole day to do, can't imagine without this clip how much time i will cost T.T
@dantharx
@dantharx 3 жыл бұрын
Excellent Video! Thank you for sharing your knowledge with us. Did I miss the part where the database was created (before the migration at the end)?
@GagandeepSingh-op8mb
@GagandeepSingh-op8mb 4 жыл бұрын
Still the biggest problem I face here is when we do composer install outside docker, we are still relying on local php version. Like I need php > 7.2 on the machine(not inside docker) to install laravel 7. Please correct me if I am wrong and let me know if there is any solution for this.
@TricoliciSerghei
@TricoliciSerghei 3 жыл бұрын
Thank you Andrew, I love you (figuratively)!!
@rahulxcr
@rahulxcr 2 жыл бұрын
Thanks. This is a great tutorial, simple and to the point.
@rogerpence
@rogerpence 5 жыл бұрын
This is a very helpful video. But one thing is bugging me! You ran composer locally, correct? Why? I don't have, nor do I want, PHP and composer installed locally. Couldn't you use docker-compose exec into the PHP container to run compose create-project? (if the PHP container doesn't have composer installed, you could do that in your Dockerfile.)
@aschmelyun
@aschmelyun 5 жыл бұрын
You're 100% correct! I just happen to have composer and PHP installed locally on my machine for installing packages + running create-project, but if you wanted you could offload that entire functionality to your docker containers. The best method would be to create a new container in your docker-compose file built off of the Composer image. This SO thread has a lot of great info in it: stackoverflow.com/questions/48127851/how-to-use-composer-with-docker-compose
@rogerpence
@rogerpence 5 жыл бұрын
Andrew Schmelyun Thank you, Andrew. Ive been using Docker for a while now but you turned on several light bulbs for me.
@paradiseofcreativity
@paradiseofcreativity 2 жыл бұрын
This is great, out of the box. Really helped me a lot. You're a life saver..
@aschmelyun
@aschmelyun 2 жыл бұрын
I'm glad it helped, thanks for the compliment!
@leoliu8546
@leoliu8546 4 жыл бұрын
One of the best Docker Tut
@hasankaraca1800
@hasankaraca1800 2 жыл бұрын
Thanks Man, very good explanation.
@dennyrachmadi1391
@dennyrachmadi1391 2 жыл бұрын
Thank you for this. clear as glass
@gayanhewa
@gayanhewa 5 жыл бұрын
Good stuff, I like the format you have used to explain each step as you go through them. I hadn't used docker-compose in a while and wanted a refresher to get it sorted for my local projects. This was more than enough to refresh my memory. +1
@aschmelyun
@aschmelyun 5 жыл бұрын
Thank you so much Gayan, comments like this are what keeps me going!
@CalicoArchives
@CalicoArchives 3 жыл бұрын
Thanks for making this video. Very well explained and easy to follow. Subscribed.
@MelissaKippPlusHomeschool
@MelissaKippPlusHomeschool 4 жыл бұрын
I followed the instruction and got to 11:45 in the video composer 'create-project laravel/laravel . ' I got an error back and I can't seem to find a solution. "Project directory ./ is not empty." Does anyone know how to get this resolved?
@aschmelyun
@aschmelyun 4 жыл бұрын
Hi Melissa! Check that directory, by default there's a README.md file in it, you'll need to remove that before continuing. Sorry that wasn't explicit in the video!
@kazemmirzaei217
@kazemmirzaei217 4 жыл бұрын
Thank you so much, Awesome!!! Could you explain what should I do in production mode? and Isn't it better to go with Laradock?
@ibolt795
@ibolt795 3 жыл бұрын
Great video! "Additional property mysql is not allowed error "---- anyone else getting this?
@sauravchauhan1628
@sauravchauhan1628 Жыл бұрын
You made my day, many thanks
@emblemcc
@emblemcc 4 жыл бұрын
No matter how I tried I made so many typos :) but now I"m more familiar with the syntax .. thanks a lot
@joshua0x
@joshua0x 3 жыл бұрын
Such a great video. You just gained a subscriber
@fruzsinakovacs6262
@fruzsinakovacs6262 4 жыл бұрын
Very useful video, thanks for making it. It should definitely have more likes.
@suvradiproy1946
@suvradiproy1946 4 ай бұрын
Excellent Video, thanks a lot!
@veoquenoesunproblema
@veoquenoesunproblema 3 жыл бұрын
It looks like the Nginx does not work properly when I execute the complete compose file, it suddenly stops.
@rantayar
@rantayar 5 жыл бұрын
i get error "502 Bad Gateway "
@universos1212
@universos1212 4 жыл бұрын
x2
@bernardchisumo4054
@bernardchisumo4054 3 жыл бұрын
could you set up Docker for multiple projects?
@АлекандрМарченко-д6г
@АлекандрМарченко-д6г 2 жыл бұрын
Hello. Can you show how to build the environment for Laravel-nodejs-pusher-echo-websocket project?
@siliconmachine
@siliconmachine 5 жыл бұрын
This is great! I hope you upload more content like this. Been fighting with it for a couple of hours and you made it super clear. I'd just suggest you add the link to the repository :) Thank you!
@aschmelyun
@aschmelyun 5 жыл бұрын
Thank you so much, I'm glad you liked it! Not sure if you saw it in the other comments, but the repo is github.com/aschmelyun/docker-compose-laravel
@LinhPham-iu2fr
@LinhPham-iu2fr 4 жыл бұрын
Thanks for the video. Just wonder what are the theme and font you use..
@aschmelyun
@aschmelyun 4 жыл бұрын
Thank you for watching it! I'm using the Material Theme UI scheme for PHPStorm, and the font is Fira Code with ligatures turned on.
@andriisukhoi5672
@andriisukhoi5672 2 жыл бұрын
Super! Thank you very much Sir!
@deolhonaboia-pescaria
@deolhonaboia-pescaria 4 жыл бұрын
Thanks so much! Saved my life!
@saeed90411
@saeed90411 2 жыл бұрын
every command worked😄it was very helpful. but I do not understand two things, how is composer working in php container? we do not have composer installed in there. and after that , how we do not need rebuild for docker-compose after changes?
@arshchoudhary5198
@arshchoudhary5198 4 жыл бұрын
Well done Andrew, I have a query how can we setup multiple laravel environment with docker?
@atipatlorwongam
@atipatlorwongam 2 жыл бұрын
This way you'll still have to install "composer" onto the host machine, in order to create project in the src directory right? is there any dockerized way around that?
@AlejandroDeLuca
@AlejandroDeLuca 3 жыл бұрын
Great explanation. Thanks!
@soduno596
@soduno596 4 жыл бұрын
Thank you so much. You made me understand docker :)
@aschmelyun
@aschmelyun 4 жыл бұрын
Glad I could help!
@FaizanAnwerAli
@FaizanAnwerAli 5 жыл бұрын
Can you also add redis for cache and background processes
@aschmelyun
@aschmelyun 5 жыл бұрын
Definitely! I'll keep that in mind for a future video 🙂
@АлінаСавчук-т4л
@АлінаСавчук-т4л 4 жыл бұрын
ERROR: for mysql Cannot create container for service mysql: invalid volume specification
@miraclemaddymm3694
@miraclemaddymm3694 4 жыл бұрын
hello there i am facing an issue which is the site cannot be reached...my nginx is running but other things not showing
@izclubcom
@izclubcom 4 жыл бұрын
i have an error: Exited (0) 8 seconds ago when using docker ps -a When i run project is: 502 Bad Gateway nginx/1.18.0 Please help me
@mcirami
@mcirami 4 жыл бұрын
You are awesome! Thanks so much for this!
@programmingwithashwani4652
@programmingwithashwani4652 3 жыл бұрын
thank you so much ! Andrew Schmelyun
@RolandoRamosTorres
@RolandoRamosTorres 11 ай бұрын
Great tutorial!!!! Thanks!!
@PeterGordon1
@PeterGordon1 3 жыл бұрын
very good tutorial. Things not going smoothly with nginx but I think it is a permission problem or something small.
@spiderdev2010
@spiderdev2010 3 жыл бұрын
Dont know what the issue always showing nginx welcome page... Can you help me in that sir?
@1337kaas
@1337kaas 3 жыл бұрын
What keyboard are you using? it sounds so satisfying :D
@aomo5293
@aomo5293 4 жыл бұрын
This is a great tutorial; Thank you very much.
@jodelmiranda3098
@jodelmiranda3098 3 жыл бұрын
Can you make tutorial to share this laravel application with docker image?
@ievatenav
@ievatenav 3 жыл бұрын
Thanks! Really good and quick! :)
@shakirbaba3978
@shakirbaba3978 2 жыл бұрын
Hi, leva. Are you able to run laravel app using docker?
@alexdorrington
@alexdorrington 2 жыл бұрын
I cannot get this to work. I was using an existing laravel project. Placing it inside a src directory with the docker files as siblings is building and spinning the containers up but my browser refuses to connect
@vladvasilov
@vladvasilov 4 жыл бұрын
Great tutorial! But unfortunately this type of configuration will run really slow...have any thoughts about this? Thanks
@CaimAstraea
@CaimAstraea 4 жыл бұрын
I was having some issues with the php alpine image trying to build some other extension like GD support
@tzalejo82
@tzalejo82 3 жыл бұрын
could you solve it?
@AS-eu8ej
@AS-eu8ej 5 жыл бұрын
The best explanation. Thnks a lot!
@biltong1683
@biltong1683 5 жыл бұрын
This was a great video, thank you! I am new to both Laravel and Docker and I was looking for a simple way to setup my environment without using homestead. I was going to use Laradock but it got way too messy. This was so much cleaner and easier to use. I did run into one issue though, when trying to set up authentication it did not load the pages correctly, I assume this is because it uses VueJS. How do I get the packages installed in the container to get this to work correctly?
@aschmelyun
@aschmelyun 5 жыл бұрын
Are you using vue-router in History mode?
@jacobward8851
@jacobward8851 4 жыл бұрын
So I did everything as shown and everything seemed to have worked but what I do notice is the docker container nginx doesn't stay up it always shows that it was exited when I run docker ps -a any idea why that would be?
@aschmelyun
@aschmelyun 4 жыл бұрын
What's the output if you just run "docker-compose up nginx" without the -d flag or anything else?
@vladvald864
@vladvald864 4 жыл бұрын
Hey, nice video, but I have a question: why does it take so much time to make a simple request/response (im not good at this stuff, but when im using xampp, time is incomparably small, so im not sure how to use docker for development).
@joroh_
@joroh_ 5 жыл бұрын
thank you, you helped me a lot, I like all your videos.
@codepilot2766
@codepilot2766 2 жыл бұрын
Hi @andrew I've followed exactly same thing. But when I try to create the laravel project with composer command, it throwing me error: zsh: command not found: composer
@riwajchalise8317
@riwajchalise8317 4 жыл бұрын
I got docker not running on my ubuntu what could be the problem
@olexiymelnychuk7274
@olexiymelnychuk7274 5 жыл бұрын
You greatly awesome! I watched a lot of trash tutorials, and nothing helped me. But your tutorial is the best!
@brosnan23
@brosnan23 4 жыл бұрын
It's frustrating to get 404 Not Found on Nginx.. I think it's path, but where could I change it
@GabrielOliveira-vn1hr
@GabrielOliveira-vn1hr 3 жыл бұрын
I'm having the same problem. Did you manage to solve it?
@brosnan23
@brosnan23 3 жыл бұрын
@@GabrielOliveira-vn1hr I think it's on docker-compose
@khnrzk7102
@khnrzk7102 3 жыл бұрын
got solution for this?
@saulandre274
@saulandre274 3 жыл бұрын
did you solve this problem?
@blessingkabungaidze620
@blessingkabungaidze620 4 жыл бұрын
Thanks for the tutorial but am having this error SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = diamond and table_name = migrations) In Connector.php line 67: SQLSTATE[HY000] [2002] Connection refused
@igoralves1
@igoralves1 4 жыл бұрын
Very good. Just a note - I faced an issue during the first test. But when I cloned from the repository all was good.
@alejandrogandara33
@alejandrogandara33 4 жыл бұрын
Great ..! Thank you for your time...
@hectorluis9294
@hectorluis9294 3 жыл бұрын
Dude the explanation was excelent, but can you tellme wich keyboard are you using? the sound of the typing was a true SRM
@BlackThreadDev
@BlackThreadDev 3 жыл бұрын
Lol... Yes. You should do some affiliate marketing!
@bbqengineer3308
@bbqengineer3308 3 жыл бұрын
Does your Laravel + Docker course address extending Laravel Sail or only Docker from scratch? Does it cover Sail? Thanks in advance!
@muhammadnasser2735
@muhammadnasser2735 3 жыл бұрын
The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.mysql: 'try
@Thomas-ft6qs
@Thomas-ft6qs 2 жыл бұрын
Hi, I am wondering how to make docker do the migrations automatically when doing docker-compose up. Have you got an idea?
@DongNguyen-kb6dc
@DongNguyen-kb6dc 5 жыл бұрын
Thanks bro. This video helpful to me
@clydeortega3766
@clydeortega3766 3 жыл бұрын
during running docker-compose exec php php /var/www/html/artisan migrate. it says, "Could not open input file: C:/Program Files/Git/var/www/html/artisan", i can't find any resources to solve this problem,
@JeeteshNariya
@JeeteshNariya 4 жыл бұрын
I don't want to use a composer in the local environment , can we use composer ras service or images?
@rdhdFAN
@rdhdFAN 4 жыл бұрын
Trying to learn Laravel but all the configuration needed to run on Windows is absolutely nuts. Even with Docker. At this point I'm really questioning why I don't just stick with a simple LAMP stack.
@gazorbpazorbian
@gazorbpazorbian 5 жыл бұрын
would it be too bad if I used this for production? any tips on that?
@parisanaderi1647
@parisanaderi1647 3 жыл бұрын
Thank you so much. I tested this. after running docker-compose up -d, php and mysql and nginx are done but localhost:8088 is not running and return "Unable to connect". What is the problem?
@Segero19
@Segero19 4 жыл бұрын
Thank you for amazing tutorial, everything worked. However, i would like to understand more about what was written in "default.conf" file and where should i look for information about all that syntax and what each line means.
@veoquenoesunproblema
@veoquenoesunproblema 3 жыл бұрын
I did exactly everything but it didn't work the localhost:8088
A much better local Laravel dev environment with Docker
10:25
Andrew Schmelyun
Рет қаралды 57 М.
Easily deploy a Laravel application with Docker
21:21
Andrew Schmelyun
Рет қаралды 92 М.
Ozoda - Alamlar (Official Video 2023)
6:22
Ozoda Official
Рет қаралды 10 МЛН
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
I built an app using a single index.php file, here's how it went
32:42
Andrew Schmelyun
Рет қаралды 93 М.
You don't need a frontend framework
15:45
Andrew Schmelyun
Рет қаралды 137 М.
Laravel Docker Course | Complete Laravel Dockerization
43:31
Emad Zaamout
Рет қаралды 88 М.
Junior Code Review: Laravel Routes, Middleware, Validation and more
19:57
This retro printer creates my daily newsletter and more… using PHP
17:07
Laravel with Docker
18:27
Scrypster
Рет қаралды 106 М.