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.
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!!
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.
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.
@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?
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...
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.
You can make couple of videos with docker-compose and Laravel. 1. Memcached for caching. 2. Redis connection for session. 3. Media storage 4. Local ssl 5. Deployment on cloud. Including Heroku, AWS and Google Cloud. 6. Php Ratchet socket connection app in docker. I have been looking for these for last 4 months. Just subscribed to keep my self updated on these videos if you upload them
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
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.
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!
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.
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.)
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
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!
could you please make more tutorial about setup docker for multiple project? btw I have followed this video and its really great tho, it works thanks!!!
For those having issues with the storage/logs/laravel.log permission, add those 3 lines to the Dockerfile RUN echo dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories RUN apk --no-cache add shadow && usermod -u 1000 www-data && groupmod -g 1000 www-data RUN chown -R www-data:www-data /var/www/html - 1st line downloads a package to allow alpine to use the command `usermod` - 2nd line uses usermod command to add user www-data and group www-data to the user ID 1000 and group ID 1000 - 3rd line changes the owner and group of the project folder to www-data
I'm a bit torn about this solution. The problem is that the UID and GID of files inside the volume must be the same values as the UID and GID outside the volume, on the host. This solution forces the www-data UID and GID to match a common UID and GID. It will work for most users, but it's a workaround with faults that will be difficult to work around later. If I come up with a way to set the UID and GID in the volume independent of their values on the host, I'll post back.
@@dotancohen Many large docker projects such as Laradock have 1000 hardcoded in their dokcerfiles for uid and gid. I am not saying that they are necessarily right to do so, but it does seem like having 1000 as your ID on your own machine is "almost-certainly-always" the case. If you are that concerned about ID disparities, you can set some `args` in your docker-compose such as UID: 1000 GID: 1000, and pass them dynamically in the Dockerfile.
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?
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
This is really cool -- I'm trying to setup Laravel on my Synology NAS (to host my laravel applications on my boat). Still pulling out my hair a bit, but progress :) Thanks for you!!
Has anybody else run into this error when trying localhost:8088? UnexpectedValueException The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
Figured it out. I'm running Fedora, and it seems php-fpm was using www-data (gid 82) by default. So I chowned the src folder my_username:82 with permissions 775 in the right places and it worked.
I'm getting this error when I try to run mysql artisan migrate: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations and table_type = 'BASE TABLE')
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.
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?
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!
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).
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
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,
what a great tutorial.. Thank you for making this.. this tutorial helps me so much!! i have a question though. Why are you making another container that contains PHP? why not installing PHP on the nginx container? and what are the effect of separating PHP and the nginx? is there any benefits? i'm really new in this.. followed your tutorial, success. understand the basic concept but still unable grasp the architecture of your docker-compose like why are you seperating PHP and nginx container.. thank you again for this tutorial.. Stay safe, Keep healthy..
Im having some issues with macos catalina... locally i have php 7.2 and i cant change it bc pc blongs to my company... but i have other projects to work with... tried to install docker like u said but having some issues doin it.
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?
Invalid top-level property "mysql". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-". help me i got this error thanks for the video.
Just curious at this point... I was creating my laravel app inside the 'src' directory, but kept getting the following error: composer create-project laravel/laravel . Creating a "laravel/laravel" project at "./" Installing laravel/laravel (v8.4.2) - Installing laravel/laravel (v8.4.2): Extracting archive No such zip file: 'C:\Users\Sungho\dev\docker-practice\src/vendor/composer/tmp-1105d76acb6dfe5ee95dff2b5085bc5e' Unzip with ZipArchive class failed, falling back to unzip command Install of laravel/laravel failed [RuntimeException] Could not delete C:/Users/Sungho/dev/docker-practice/src/.: This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed I was able to solve the issue by doing composer create-project laravel/laravel . /src while in the root directory. If anyone has any ideas why it was erroring out, it'd be much appreciated. I'm at least 90% sure this is just user error on my part. At this point, just very curious on wth was happening.
Hi Andrew, I am a new to docker. Just a beginner. When I run docker-compose build && docker-compose up -d command, I get this error ERROR: In file './docker-compose.yml', volume must be a mapping, not an array. I could not figure out the issue.
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?
The problem is you infest your local computer with php, nginx (where's all that stored???) I use homestead with virtual box, everything goes to a separate vm.
i did the same steps and it's not working when go to localhost:8088, the (it's working) html is not appearing and my localhost can't see the server, note: no error
so we can essentially run test's on different versions and also Automated test Scripts on different containers to check if our web App works or not? It's Awesome can you create a tutorial for docker with laravel -vue - mongodb.
I wanted to use docker as a nice development tool for Windows and laravel is now using the same thing as laradock but the command line is using the xshell connection for execution and I wanted to find a better solution
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?
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?
If anyone looking for a solution. Add the following code inside nginx/default.conf inside server before location ~ \.php$ code: location / { try_files $uri $uri/ /index.php$is_args$args; }
I'm getting unable to connect when I go to localhost:8088, I don't have a local server started on my ubuntu vm, could that be the reason. Also everything run fine and all images build successfully. Any help?
Step 1: In your docker-compose.yml file change the ports for the nginx service to 80:80. Step 2: Add the following line to your hosts file and save it: 127.0.0.1 example.local If you're on Windows the hosts file will be at c:\Windows\System32\Drivers\etc\hosts on a MacOS or Linux system it should be at /etc/hosts
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.
That's how a tutorial should be. To the point & not a single second wasted. Awesome! 👍
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!!
I'm glad you liked it, that means a lot to me! You're welcome!
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.
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.
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.
You got it!
In case you haven't seen it, it's out now! ruclips.net/video/ozKxWsojYJ4/видео.html
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.
@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?
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...
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.
This is exactly what I was looking to know how to do. Thanks for the tutorial. Straight to the point
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!
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.
Best one....best one...best one....!!!! I didn't get any clear understanding video like this. Thanks... Love you man... ❤
No matter how I tried I made so many typos :)
but now I"m more familiar with the syntax .. thanks a lot
This is a great tutorial man, it's very clear and easy to understand. Keep it up sir, from the Philippines.
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)?
You can make couple of videos with docker-compose and Laravel.
1. Memcached for caching.
2. Redis connection for session.
3. Media storage
4. Local ssl
5. Deployment on cloud. Including Heroku, AWS and Google Cloud.
6. Php Ratchet socket connection app in docker.
I have been looking for these for last 4 months.
Just subscribed to keep my self updated on these videos if you upload them
One of the best tutorial on this! Well done. Straight forward and on point.
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
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
Thank you so much Gayan, comments like this are what keeps me going!
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.
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.
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!
This was awesome! Helped me allot to get things up and running quickly.
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
Very good. Just a note - I faced an issue during the first test. But when I cloned from the repository all was good.
Thank you so much, Awesome!!!
Could you explain what should I do in production mode? and Isn't it better to go with Laradock?
Great video! "Additional property mysql is not allowed error "---- anyone else getting this?
Thank you so much for this video. Easy to understand. Short and to the point.
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.
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.)
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
Andrew Schmelyun Thank you, Andrew. Ive been using Docker for a while now but you turned on several light bulbs for me.
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.
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!
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
Great Video Andrew!! Been looking for a great video Laravel setup in Docker and this was it!
Great tutorial, Simply explained! Thank you for this
This is what I am looking for, Great work Man👏
could you please make more tutorial about setup docker for multiple project?
btw I have followed this video and its really great tho, it works thanks!!!
Thanks Andrew! It was exactly what I was looking for!
Brilliant presentation ......................... Thanks Andrew
set playback speed on 0.9 and enjoy this perfect tutorial
For those having issues with the storage/logs/laravel.log permission, add those 3 lines to the Dockerfile
RUN echo dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories
RUN apk --no-cache add shadow && usermod -u 1000 www-data && groupmod -g 1000 www-data
RUN chown -R www-data:www-data /var/www/html
- 1st line downloads a package to allow alpine to use the command `usermod`
- 2nd line uses usermod command to add user www-data and group www-data to the user ID 1000 and group ID 1000
- 3rd line changes the owner and group of the project folder to www-data
I'm a bit torn about this solution. The problem is that the UID and GID of files inside the volume must be the same values as the UID and GID outside the volume, on the host. This solution forces the www-data UID and GID to match a common UID and GID. It will work for most users, but it's a workaround with faults that will be difficult to work around later. If I come up with a way to set the UID and GID in the volume independent of their values on the host, I'll post back.
@@dotancohen Many large docker projects such as Laradock have 1000 hardcoded in their dokcerfiles for uid and gid. I am not saying that they are necessarily right to do so, but it does seem like having 1000 as your ID on your own machine is "almost-certainly-always" the case.
If you are that concerned about ID disparities, you can set some `args` in your docker-compose such as UID: 1000 GID: 1000, and pass them dynamically in the Dockerfile.
Thankyou man...this video is exactly what I was looking for
JUST GOT AMAZED WITH THE SPEED OF yOU ARE DOING .. CAN YOU PLEASE BE MY MENTOR?
Been annoyed with wamp for so long. MS nailed it with blocking my hosts file evry so often these days. Hopefully this will work
ERROR: for mysql Cannot create container for service mysql: invalid volume specification
i get error "502 Bad Gateway
"
x2
Thanks for making this video. Very well explained and easy to follow. Subscribed.
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?
Thanks. This is a great tutorial, simple and to the point.
Thank you Andrew, I love you (figuratively)!!
Hello. Can you show how to build the environment for Laravel-nodejs-pusher-echo-websocket project?
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
This is really cool -- I'm trying to setup Laravel on my Synology NAS (to host my laravel applications on my boat). Still pulling out my hair a bit, but progress :) Thanks for you!!
On your BOAT?! That's awesome, haha! If you get stuck again and need any help, feel free to message me.
Has anybody else run into this error when trying localhost:8088?
UnexpectedValueException
The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
Changing permissions to 777 fixed this issue, but that's obviously not ideal.
Figured it out. I'm running Fedora, and it seems php-fpm was using www-data (gid 82) by default. So I chowned the src folder my_username:82 with permissions 775 in the right places and it worked.
Exactly what I was looking for. Thanks
I'm getting this error when I try to run mysql artisan migrate: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations and table_type = 'BASE TABLE')
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.
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?
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!
very good tutorial. Things not going smoothly with nginx but I think it is a permission problem or something small.
This is great, out of the box. Really helped me a lot. You're a life saver..
I'm glad it helped, thanks for the compliment!
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).
Dude the explanation was excelent, but can you tellme wich keyboard are you using? the sound of the typing was a true SRM
Lol... Yes. You should do some affiliate marketing!
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
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,
Thanks Man, very good explanation.
It looks like the Nginx does not work properly when I execute the complete compose file, it suddenly stops.
One of the best Docker Tut
what a great tutorial.. Thank you for making this.. this tutorial helps me so much!!
i have a question though.
Why are you making another container that contains PHP? why not installing PHP on the nginx container?
and what are the effect of separating PHP and the nginx? is there any benefits?
i'm really new in this.. followed your tutorial, success. understand the basic concept but still unable grasp the architecture of your docker-compose like why are you seperating PHP and nginx container..
thank you again for this tutorial..
Stay safe, Keep healthy..
Im having some issues with macos catalina... locally i have php 7.2 and i cant change it bc pc blongs to my company... but i have other projects to work with... tried to install docker like u said but having some issues doin it.
The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.mysql: 'try
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?
Invalid top-level property "mysql". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-". help me i got this error thanks for the video.
Just curious at this point...
I was creating my laravel app inside the 'src' directory, but kept getting the following error:
composer create-project laravel/laravel .
Creating a "laravel/laravel" project at "./"
Installing laravel/laravel (v8.4.2)
- Installing laravel/laravel (v8.4.2): Extracting archive
No such zip file: 'C:\Users\Sungho\dev\docker-practice\src/vendor/composer/tmp-1105d76acb6dfe5ee95dff2b5085bc5e'
Unzip with ZipArchive class failed, falling back to unzip command
Install of laravel/laravel failed
[RuntimeException]
Could not delete C:/Users/Sungho/dev/docker-practice/src/.:
This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed
I was able to solve the issue by doing composer create-project laravel/laravel .
/src while in the root directory. If anyone has any ideas why it was erroring out, it'd be much appreciated. I'm at least 90% sure this is just user error on my part. At this point, just very curious on wth was happening.
Hi Andrew, I am a new to docker. Just a beginner.
When I run docker-compose build && docker-compose up -d command,
I get this error
ERROR: In file './docker-compose.yml', volume must be a mapping, not an array.
I could not figure out the issue.
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?
You greatly awesome! I watched a lot of trash tutorials, and nothing helped me. But your tutorial is the best!
Very useful video, thanks for making it. It should definitely have more likes.
The problem is you infest your local computer with php, nginx (where's all that stored???)
I use homestead with virtual box, everything goes to a separate vm.
Such a great video. You just gained a subscriber
I did exactly everything but it didn't work the localhost:8088
Well done Andrew, I have a query how can we setup multiple laravel environment with docker?
returns Welcome to nginx for me. am i missing something?
@Andrew Schmelyun I also get the default Nginx welcome page. Can you help? Thanks!
Great tutorial! But unfortunately this type of configuration will run really slow...have any thoughts about this? Thanks
i did the same steps and it's not working when go to localhost:8088, the (it's working) html is not appearing and my localhost can't see the server, note: no error
When i create laravel project on src folder, and access the url, i always got 404 Not Found. How can i fix this ?
Thanks
Define working_dir: /var/www/html in nginx and php services
so we can essentially run test's on different versions and also Automated test Scripts on different containers to check if our web App works or not? It's Awesome can you create a tutorial for docker with laravel -vue - mongodb.
I was having some issues with the php alpine image trying to build some other extension like GD support
could you solve it?
I wanted to use docker as a nice development tool for Windows and laravel is now using the same thing as laradock but the command line is using the xshell connection for execution and I wanted to find a better solution
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?
What's the output if you just run "docker-compose up nginx" without the -d flag or anything else?
Thank you for this. clear as glass
Can you make tutorial to share this laravel application with docker image?
Hi Sir, my nginx container is not running but mysql and php containers does successfully...where i am possibly wrong? thanks
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?
Are you using vue-router in History mode?
Thanks for this video, for me the last step, adding a custom laravel route isn't working. Any idea what could be the cause of this?
If anyone looking for a solution. Add the following code inside nginx/default.conf inside server before location ~ \.php$ code:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
You made my day, many thanks
hello there i am facing an issue which is the site cannot be reached...my nginx is running but other things not showing
I'm getting unable to connect when I go to localhost:8088, I don't have a local server started on my ubuntu vm, could that be the reason. Also everything run fine and all images build successfully. Any help?
Hi, I am wondering how to make docker do the migrations automatically when doing docker-compose up. Have you got an idea?
how could we use a domain name such as example.local in stead of localhost:8088? I tried a couple of things but I feel like I am missing a step.
Step 1: In your docker-compose.yml file change the ports for the nginx service to 80:80.
Step 2: Add the following line to your hosts file and save it: 127.0.0.1 example.local
If you're on Windows the hosts file will be at c:\Windows\System32\Drivers\etc\hosts on a MacOS or Linux system it should be at /etc/hosts
@@aschmelyun it works :) . Thank you
Dont know what the issue always showing nginx welcome page... Can you help me in that sir?