Setting up a New Laravel Application and phpMyAdmin using Docker

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • In this video we setup a new Laravel application and phpMyadmin using a Docker and Sail.
    Full Tutorial: codeadam.ca/le...
    PHP: www.php.net/
    Composer: getcomposer.org/
    Laravel: laravel.com/
    Sail: laravel.com/do...
    Docker: www.docker.com/
    ---
    Website: codeadam.ca/
    Twitter: / codeadamca
    Instagram: / codeadamca
    GitHub: github.com/cod...

ความคิดเห็น • 84

  • @overstandnigeria
    @overstandnigeria 8 หลายเดือนก่อน +2

    Thank you so much for this. I'm a Devops Engineer and I have been waiting for my devs to containerize our laravel backend and I needed something to get the pipline going while I wait on them .This just saved me some hours . Thank you so much .

  • @J90JAM
    @J90JAM ปีที่แล้ว +3

    Legend! This was slightly tricky to figure out as there's not a great deal of information online and the Laravel docs just seem to leave you on the edge of a cliff if it's your first experience setting up Laravel and especially using Sail.

  • @peterjohnvillanueva8113
    @peterjohnvillanueva8113 ปีที่แล้ว +4

    Thank you Adam! Really great tutorial for a newbie like me trying to setup Laravel and Docker. :)

  • @ahahhaize
    @ahahhaize 4 หลายเดือนก่อน

    Saved me so many times. You are the best bro. Sadly that I can't like your video more than 1 time

  • @subashsharma3741
    @subashsharma3741 10 หลายเดือนก่อน +4

    Great to learn this. Thanks soo much!

  • @amirsoltani3595
    @amirsoltani3595 ปีที่แล้ว +1

    Thanks a lot Adam.
    It was really short and helpful.

  • @firasnazaini6449
    @firasnazaini6449 2 ปีที่แล้ว +1

    Thanks You SO MUSH for making this video! It help me with my problem.

  • @rorisangmadonko4981
    @rorisangmadonko4981 10 หลายเดือนก่อน

    Great video. Thank you for teaching me. I understood everything 100%.

  • @athleticed9753
    @athleticed9753 2 ปีที่แล้ว +1

    You are golden! :) Thank you for this easy to follow tutorial.

    • @codeadamca
      @codeadamca  2 ปีที่แล้ว +1

      Glad it helped!

  • @andersonbrandao1949
    @andersonbrandao1949 9 หลายเดือนก่อน

    Thank you so much. Laravel is so easy to set up.

  • @messiasjunior2828
    @messiasjunior2828 8 หลายเดือนก่อน

    The content is very good. Congratulations!

  • @AhmedEssam-jv2nm
    @AhmedEssam-jv2nm ปีที่แล้ว +1

    you are the best >> life saver dude

  • @ellgibug
    @ellgibug หลายเดือนก่อน

    Thank you so much for your video! It helped a lot!!!

  • @AnthonySmith-tw2ll
    @AnthonySmith-tw2ll 2 ปีที่แล้ว

    Perfect tutorial, thank you Adam!

    • @codeadamca
      @codeadamca  2 ปีที่แล้ว

      Glad you liked it!

  • @StephenAinsworth1
    @StephenAinsworth1 2 ปีที่แล้ว +1

    This was so good. Thank you so much!

  • @Sdirimohamedsalah
    @Sdirimohamedsalah 8 หลายเดือนก่อน

    Great video , how build it and remove unnecessary packages in order to be ready for production environment? Any ideas?

  • @himaliamit8698
    @himaliamit8698 9 หลายเดือนก่อน

    when i type ./vendor/bin/sail up. it says error invalid host header. i couldnt find appropriate answers aswell.

  • @Ms_Mac
    @Ms_Mac 10 หลายเดือนก่อน

    Do you have a video or instructions where you can attach a different database, like mongo db?

  • @punkygameryt
    @punkygameryt 10 หลายเดือนก่อน

    Its my first day since im trying with laravel sail docker and its pretty much confusing. Im using windows os and without sail im confident using laravel but can you clear my doubts. If i create a new project then will the Images of mysql, redis bla bla bla will be created again or not ? Clear my doubts i will really appreciate your help sir.

  • @makkapoya
    @makkapoya ปีที่แล้ว

    Thank you very much! It was really useful

  • @user-fu5gr9ck9v
    @user-fu5gr9ck9v ปีที่แล้ว

    all i can say is a huge thank you... : )

  • @rizwan.ahmad.qureshi
    @rizwan.ahmad.qureshi ปีที่แล้ว

    Thankyou Adam for the video

  • @fawadazeem2248
    @fawadazeem2248 ปีที่แล้ว +1

    Great tutorial thanks ❤

  • @syafiqazizan8719
    @syafiqazizan8719 2 ปีที่แล้ว +2

    Hi, it a great video! I am a beginner for laravel & docker. It would be great also next tutorial can have a tutorial how to manually dokerize laravel9 with nginx, mysql, phphmyadmin, & redis. As a student from university I can learn to dokerize a good step without using laravel sail. Hope you can give reference to beginner like me

    • @codeadamca
      @codeadamca  2 ปีที่แล้ว +2

      That's a good idea for a video! I do have one where I use Docker to manually setup a standard LAMP stack, and that LAMP stack could be used to run a Laravel application. You may just need to adjust the default Apache root folder to the public folder within your Laravel application.
      th-cam.com/video/zWyggxV51oQ/w-d-xo.html

    • @syafiqazizan8719
      @syafiqazizan8719 2 ปีที่แล้ว

      @@codeadamca Thank you. I already follow that tutorial with LAMP (Apache). It also a good tutorial for beginner like me with PHP. Hope soon can hand on with LEMP(Nginx) stack include Doker, Laravel & Redis.

  • @PauloVitor-pe7qp
    @PauloVitor-pe7qp ปีที่แล้ว

    Thank you Adam!
    very good

  • @yoggyajiwibowo8538
    @yoggyajiwibowo8538 8 หลายเดือนก่อน

    thank you, it works pretty well on me

  • @yikunobarnaby5759
    @yikunobarnaby5759 9 วันที่ผ่านมา

    well, that was easy. lol
    Spent two days trying to get my project to run on a container, then I thought, "wait, shouldn't docker already have a solution to this?" and here we are. lol.

  • @sirajalzahran9804
    @sirajalzahran9804 5 หลายเดือนก่อน

    Thank you, great tutorial

  • @clementborisov7050
    @clementborisov7050 ปีที่แล้ว

    Hey, man, can you set up React using Vite and dockerize that React app with this setup?

  • @tiagotheoliveira
    @tiagotheoliveira 2 ปีที่แล้ว +1

    Very good! Thanks!

  • @dtb8008
    @dtb8008 ปีที่แล้ว

    Hi Adam, thank you so much for this tutorial.
    Whenever I run a migration inside the laravel container's shell, and want to save something in that migrationfile in VScode, I get: an Insufficient permissions error. I have to type my sudo password every single time I want to save the file. Why is that and how can I fix it?

    • @codeadamca
      @codeadamca  ปีที่แล้ว

      Sorry, but I'm not sure. I have never encountered his before. I have one possible help...
      Try running the migration command using sudo, something like:
      sudo php artisan migrate:refresh --seed
      It should as for your password the first time, but not every time.

  •  ปีที่แล้ว

    Thank you Adam! +1 subscribed.

  • @firelordkushroll
    @firelordkushroll 2 ปีที่แล้ว

    do i send another dev just all teh code and let the docker-compose file do everything? or is there a way to package the 4+ containers and send those to them?

    • @codeadamca
      @codeadamca  2 ปีที่แล้ว

      Ideally you should use a GiHub repo, then all the other developer needs is your GutHub repo URL (if not send them your code, not including the vendors folder). Then they can clone the repo. Run the Docker compose. From the main container run PHP composer and the Laravel migrations. Then they should have an identical functional app!

    • @firelordkushroll
      @firelordkushroll 2 ปีที่แล้ว

      @@codeadamca mkay thats what i was thinking. thank you. using private repo rn, which is a headache sometimes. but mkay wanted to ask. ty!

  • @jdwileymon
    @jdwileymon ปีที่แล้ว

    do you actually need Sail to run a laravel app on Docker? what about dockerizing an existing laravel app?

    • @codeadamca
      @codeadamca  ปีที่แล้ว

      You don't need Sail to run a Laravel app on Docker. You can set up a pretty standard LAMP stack using Docker and deploy a Laravel app. I walk through setting up Dovker from scratch here:
      studio.th-cam.com/users/videozWyggxV51oQ/edit

  • @miguelangelgaray7682
    @miguelangelgaray7682 2 ปีที่แล้ว

    Hi Adam, thanks for the tutorial. I've noticed that you ran the migration through the Laravel container's console in docker. I've been trying to do that through the VS Code integrated terminal and also through PowerShell, both at my project location without luck(I get 2002 error). Do you happen to know why I can only run migrations through the Laravel container command line?.

    • @codeadamca
      @codeadamca  2 ปีที่แล้ว +8

      Each container in Docker is essentially a different computer or virtual hosts. In this example, our docker-compose.yml creates six different computers. One to run the application, one to run the MySQL database, one to run PHPMyAdmin , etc... When you open a terminal using a Docker container, those commands are being executed on that computer. For example when you run a migration on the container named "fresh-laravel_laravel", it will use the database settings to add tables to the "fresh-laravel_mysql" container.
      When you use the terminal in VSCode or PowerShell, it will attempt to run the migration on your local computer. This won't work because the migration will use the database information from .env file, and from your local computer's "point of view" it won't be able to find the database server.
      Using Docker means you don't even need PHP, Laravel, MySQL, etc... installed on your local computer.
      Hope that helps!

    • @firelordkushroll
      @firelordkushroll 2 ปีที่แล้ว +4

      in the shell i just run sail shell, it opens a shell for the laravel contianer, and i run all artisan commands there. ez pz

    • @Mrtassan
      @Mrtassan ปีที่แล้ว +1

      you can run the command from vs code like this.
      ./vendor/bin/sail php artisan migration:refresh
      Prefixing the command with sail, tells the laravel app to run the command inside the container

  • @HassanMpuruti
    @HassanMpuruti 2 ปีที่แล้ว

    Hi, Amazing tutorial. Can you help me i am having trouble location the project files after running the "curl laravel build" command

    • @codeadamca
      @codeadamca  ปีที่แล้ว

      The files should be located in the same directory you executed the cURL command in. Next time run "pwd" (stands for present working directory) before running the command, then you can find your files using Finder or VSCode.

  • @michellesayson6130
    @michellesayson6130 ปีที่แล้ว +1

    Thank you so much ❤

  • @MrJonardski
    @MrJonardski ปีที่แล้ว +1

    THANK YOU SO MUCH!

  • @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

    • @codeadamca
      @codeadamca  2 ปีที่แล้ว

      If you go to the Docker Hub, there are lots of NGINX images, one of those may be sufficient:
      hub.docker.com/_/nginx
      I have never personally run a Laravel application on an NGINX server. I have only used NGINX for Node.js applications.

  • @UmitCanakci
    @UmitCanakci 2 ปีที่แล้ว +1

    Thank you so much!

  • @sazidahmed3012
    @sazidahmed3012 2 ปีที่แล้ว +1

    Just perfect

  • @atovan3236
    @atovan3236 ปีที่แล้ว

    services.phpmyadmin Additional property enviroment is not allowed
    How to fix that, bro ?

    • @codeadamca
      @codeadamca  ปีที่แล้ว

      Sorry, that's a hard one without seeing the error. I think it might be an indentation error. In the docker-compose.yml the tabbing must be accurate!

  • @worldoflanguages1043
    @worldoflanguages1043 2 หลายเดือนก่อน

    im getting503 SERVICE UNAVAILABLE

  • @mikhail-polyarus
    @mikhail-polyarus ปีที่แล้ว

    GOOD JOB, THANK YOU!)

  • @SalakotPhilippines
    @SalakotPhilippines ปีที่แล้ว

    Thanks Adam

  • @toluayeni2482
    @toluayeni2482 ปีที่แล้ว

    I can't login into phpmyadmin, mysqli::real_connect(): (HY000/2002): Connection refused.

    • @iamzxenxi2260
      @iamzxenxi2260 ปีที่แล้ว

      same issue here mysqli::real_connect(): php_network_getaddresses: getaddrinfo for msyql failed: Temporary failure in name resolution
      mysqli::real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo for msyql failed: Temporary failure in name resolution

    • @iamzxenxi2260
      @iamzxenxi2260 ปีที่แล้ว

      it turns out i made a typo in pma_host lol

  • @mehlulinokwara3841
    @mehlulinokwara3841 ปีที่แล้ว

    Beautiful

  • @rishneelchand195
    @rishneelchand195 ปีที่แล้ว

    Laravel is working but localhost:8001 not working. The php my admin page is not coming.ANy idea why?

    • @kanao8378
      @kanao8378 ปีที่แล้ว

      i have same issue, have you find the solution?

    • @rishneelchand195
      @rishneelchand195 ปีที่แล้ว

      @@kanao8378 I tried to close of any ports that are using 8001 port and also close mysql and apache http server on your task manager if there is any and finally put the command docker compose up and then the vendor bin sail up command

  • @amrhesham6383
    @amrhesham6383 3 หลายเดือนก่อน

    thanks a lot

  • @domjanzsoo
    @domjanzsoo 6 หลายเดือนก่อน

    Thanks.

  • @AMoktar
    @AMoktar ปีที่แล้ว

    Thanks 🙏

  • @user-lj9vi2cj9f
    @user-lj9vi2cj9f ปีที่แล้ว

    thanks !

  • @deepakms5918
    @deepakms5918 ปีที่แล้ว

    👍👍👍

  • @user-qb6dq3jc4j
    @user-qb6dq3jc4j 11 หลายเดือนก่อน

    Is this a joke ? where is the installation docker process, and the req things to fulfill , wht os u are using ?

  • @MegaOsama99
    @MegaOsama99 ปีที่แล้ว

    ❤ Like * 1000

  • @anonnim5132
    @anonnim5132 8 หลายเดือนก่อน +1

    bullshit

  • @1resscue
    @1resscue ปีที่แล้ว +1

    Damn I can't even run the first command...

  • @Sebastian-rh5gt
    @Sebastian-rh5gt ปีที่แล้ว

    Thank you!

  • @Myankov
    @Myankov 2 ปีที่แล้ว +1

    If having this error: "The stream or file "/var/www/html/storage/logs/laravel.log"
    this is a solution: sudo chmod o+w ./storage/ -R

  • @taianhnguyen6975
    @taianhnguyen6975 ปีที่แล้ว

    Great tutorial thanks ❤