Install and Set Up Laravel with Docker Compose

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • In this video, we’re going to set up Laravel in the local environment with Docker using the LEMP stack that includes: Nginx, MySQL, PHP, and phpMyAdmin.
    #docker #dockercompose #laravel #mysql #nginx #phpmyadmin
    ▬▬▬▬▬▬ Read about this video ▬▬▬▬▬▬
    GitHub: github.com/han...
    Medium: / setting-up-a-laravel-l...
    ▬▬▬▬▬▬ Other videos from my channel 🎥 ▬▬▬▬▬▬
    Repository Design Pattern: • Make Your Code Clean a...
    Microservices Architecture: • Microservices Architec...

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

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

    Great video!
    Videos like this are rare. Errors are important for us to know what to do to correct errors.
    Thanks!

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

      It's great to hear from you.

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

      @@hanieasemi Congratulations on your channel.
      Keep up with this excellent work!
      Thanks!

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

    Thanks, simple & clean!
    You saved me, after all the time i wasted watching other videos. 🙏🙏

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

      Thanks

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

    I managed to install composer and other dependencies using Dockerfile RUN command. Everything went fine!
    Thank you!

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

      Thanks for watching.

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

      How did you do that? Thanks

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

    خیلی عالی بود به ساده ترین شکل ممکن بیان کردید الان حدود ۳ ماه هست هر ویدیدیی میدیدم از داکر متوجه نمی‌شدم چون هیچ پیش‌زمینه ای نداشتم ازش ولی آموزش شما خیلی کمک کرد بهم و الان درک بهتری دارم از داکر ❤❤

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

      ممنون که ویدیو رو نگاه کردید و خوشحالم که تونسته کمکتون کنه 🤟

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

    I could be missing something, but is there a gap in the video? It seems to jump from the phpMyAdmin section to building the application, missing out the app docker-compose service and making the Dockerfile?

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

    Oh shit! I forgot to write the APP part but I have posted the video😮

  • @stepphriw
    @stepphriw 11 หลายเดือนก่อน +1

    Thanks you , you just save my life .

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

    Its a mind blowing tutorial.

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

    Thank you, this is very helpful.

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

    nice video. was able to learn something new. i have 2 more things. 1. how do i take docker+laravel to another server? 2. how do i upgrade docker+laravel both?

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

      For running another project you need to create another docker-compose file in its directory and update the container name and ports of each service.

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

    That was so helpful, thank you ✌

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

      Thanks for watching🙏🏻

  • @ariog.iswahyudi5243
    @ariog.iswahyudi5243 6 หลายเดือนก่อน

    did you have installed php & composer natively alongside docker ? it's look laravel has running well before binding to docker volume

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

      Sorry I didn't get your question. Could you please explain it more?

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

    Thank u so much!!!!

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

    Great video!

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

    So much great 👏

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

      Thanks for watching

  • @CarlosEduardo-oo4tf
    @CarlosEduardo-oo4tf 11 หลายเดือนก่อน +1

    only bad thing in your video is the part where you skipped the dockerfile shit

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

    Informative one. I have been learning docker but i am getting confused as different folks do it differently. Here i am confused that why you didn't use Dockerfile.
    Can you create another video for clearing my confusion?
    Using laravel, Nginx, MySQL.
    And how to work with docker some other developer? If possible please do one more.
    Thank You.

  • @m.yasirshakil979
    @m.yasirshakil979 ปีที่แล้ว +1

    Great video

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

    amazing video 👏

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

    I am getting error "validating D:\wamp64\www\docker\docker-compose.yml: services.app must be a mapping". I am following the video and app: is empty.. do i need to add image and container_name in it ?

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

    Your video was so inspiring! You have a great talent for motivating others. Keep sharing y💪 our 😃 positivity 💪 with 😃 the 💪 world 😃 through 💪 your 😃 TH-cam 💪 channel 😃! Keep 💪 it 😃 up 💪😃

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

    Hello, you did not create a docker file, I am getting an error about this. I will use mysql, when I followed your steps, the container was not created, can you help me?

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

      Hi, did you check the GitHub repo?
      You can find the Dockerfile here: github.com/hanieas/Docker-Laravel
      Let me know if you have any problem

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

    superb tutorial, just one concern, it takes little more time while refreshing page to see changes.
    is it normal behavior in docker ?
    and where you have mentioned OS like ubuntu ?
    How can run docker by putting code inside ubuntu wsl from windows ?
    pls guide.

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

    I have a problem with app:
    I copied the code for app: from github. But i get an error
    build path /php either does not exist, is not accessible, or is not a valid URL.

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

      Could you please share your problem via email?

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

    very useful 😊

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

    Hi, I want to do something like DevOps and I don't have the vendor folder in the project. In the image, I need to run "composer install," but it seems like the nginx container will also need this command. Is that right? Cheers!

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

      Hi, You need to run this command inside the application container, for example if you're container name is app go inside this container: docker compose exec app bash
      Then run composer install.
      Nginx is just a web server it doesn't need this command. This is just for installing packages. Check this link out:getcomposer.org/doc/00-intro.md

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

      @@hanieasemi thanks you, other thing, I have index.php in root folder, not in public, and nginx set path to public

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

    Could you create video about install supervisor to docker?

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

      Thanks for watching, Sure I'll consider it.

  • @dream-kp6yw
    @dream-kp6yw ปีที่แล้ว

    مرسی خیلی خوب بود مشکل من حل شد

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

    well explained 😉

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

    good one

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

    may i have run on docker desktop , if i dont want to open vscode then use command "docker-compose -d". On my Docker desktop didnt show a container, so i cant click run on that. i have to open vscode and run it.

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

    thank you

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

    Thank You!

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

    as i know theres sail built in with laravel do all job is it the same thing ?

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

    Great video!

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

    Thank you, but can you please tell us how can we dockerize apps thath are cloned from git , we need to do composer install, i was unabel to do thath true docker for my laravel 5.8 app thath is using composer v1?

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

      It doesn't matter where did you get the project. You can create a docker-compose file and a Dockerfile which you can define php version in this file.

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

    Good one but after putting docker-compose up -d it shows nginx container exited immediately. Any thoughts on this issue?
    Thanks!

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

      Thanks for watching! please check the conf.d file and make sure it sets up correctly.

  • @dream-kp6yw
    @dream-kp6yw ปีที่แล้ว

    salam man ye soual daram vaghty ke proje ra build mikonim vaghty ro proje code hara avaz konim dakhele on proje update nmishe bayad chikar bokonim?

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

      Did you add working_dir: /var/www to the app container?

    • @dream-kp6yw
      @dream-kp6yw ปีที่แล้ว

      🥴@@hanieasemi you know I made a mistake in addressing 😞 thank you🤍

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

    docker compose command not work in your project

  • @김준엽-q3s
    @김준엽-q3s ปีที่แล้ว

    감사합니다😊

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

      시청 해주셔서 감사합니다 🙂

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

    this tutorial missing the create Dockerfile in folder php step

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

      This file can be changed based on your needs, so I prefer not to talk about more details and finish the tutorial in a reasonable time

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

    i can not login to phpmyadmin

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

    does this still work today?

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

      Yeah!

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

    why ngnix?

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

      Why not?

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

    good girl

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

    hello
    how to run npm run dev for vite?

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

      Open your container terminal using terminal itself or open it from docker panel interface and run it there

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

      @@keivanpourzang4633 not listening to vite port 300

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

      ​@@juantevez9267 do you find an answer ?

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

    Why did you skip some steps.

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

      What steps would you like to explain? I can make another video.

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

      @@hanieasemi I did not see the php and laravel setup in the video

  • @ebrahem-dev
    @ebrahem-dev 6 หลายเดือนก่อน

    your video is incomplete!

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

      What can I do to complete the video?

  •  ปีที่แล้ว

    Parse error: syntax error, unexpected identifier "string", expecting variable in /var/www/vendor/sebastian/version/src/Version.php on line 25 I don't know this.

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

    Hi Hanie, thanks for your course. After getting a build error when working through the tutorial steps, I pulled your repository... per instructions switched from postgres to mysql and attempted to run. Build went fine, but on trying localhost:8080 ,
    Warning: require(/var/www/public/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/public/index.php on line 34
    Fatal error: Uncaught Error: Failed opening required '/var/www/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/public/index.php:34 Stack trace: #0 {main} thrown in /var/www/public/index.php on line 34
    any idea?

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

      Just forked your own git repo, no changes, built, started, and same error on localhost:8080

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

      @@karlkrasnowsky3895 did you install composer?

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

      @@hanieasemi yes, of course.

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

    make: *** No rule to make target '/usr/src/php/ext/tokenizer/Zend/zend_language_parser.y', needed by '/usr/src/php/ext/tokenizer/Zend/zend_language_parser.c'. Stop.
    i make php8.2

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

    Nice @hanieasemi