PHP Docker Tutorial - Nginx - PHPFPM VS Apache - Full PHP 8 Tutorial

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024

Комментарии • 339

  • @cw1847
    @cw1847 3 года назад +75

    Gio, you are an awesome teacher. This whole course is GOLD. Thank you.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +6

      Thank you so much 🙏

    • @davidbrandt4821
      @davidbrandt4821 2 года назад +1

      @Samir Ibrahim Couldn't say it better!🤙

    • @vladimir_fomin90
      @vladimir_fomin90 Год назад

      @@ProgramWithGio hi! I use devilbox how to alternative xammp

  • @bracoyote96
    @bracoyote96 Год назад +9

    Many times I've tried and failed to understand what docker is. Now I have a basic but solid idea of what it is thanks to a PHP guide. Wasn't expecting that but thank you very much ^^

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      That is super awesome, really happy to hear that

  • @rodolphe8859
    @rodolphe8859 Год назад +9

    That 's a proper course.Every learning program should be like that.Learning the right syntaxe, the right architecture and the right way ;)

  • @isaacsouza17
    @isaacsouza17 3 года назад +10

    Once you use docker (and get over the first headaches) you will never want go back to thing like XAMPP, docker, and specially docker-compose, are great for local development, even more for people who use Linux, in which docker runs at lightspeed.
    Thanks for the tutorial, great video, keep it up.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Thank you. I agree 💯. I haven't used anything else since I started using Docker.

  • @snakemanluffy7645
    @snakemanluffy7645 3 года назад +8

    wow, It's been a while. I stopped watching you cause there were no more PHP videos. Tnx I will finish again today. Will wait for another 8-10 videos to watch. Thank you for this amazing course. I want to let you know that I got the job that I was telling you about. It's a PHP/Laravel Job. I have learnt so much from you about PHP. Thank you. I will be grateful forever :)

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      That's amazing. Im happy to hear that my videos were & are helpful. Thank you 🙏

    • @omegajunior8963
      @omegajunior8963 3 года назад

      @@ProgramWithGio This is an error i get got when i did docker-compose up, kindly assist services.app.build must be a string

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      @@omegajunior8963 DM me on Twitter and I'll help you troubleshoot it. If you can share your Dockerfile & docker-compose that will be better

    • @omegajunior8963
      @omegajunior8963 3 года назад

      @@ProgramWithGio I have been able to solved it. i didnt type the codes well. Thank you very much. I am enjoy this course by the time i get to video 70 i will be able write a complete program. you are blessing me

  • @abrahamnalisi4648
    @abrahamnalisi4648 Год назад +5

    I love how you explained Docker and its configuration. I've been trying to understand it for months but your content made me unify everything I read before and even get a project up and running within docker. I'm a seasoned PHP dev and I'm enjoying re-learning from your course coz its making me understand 'newer' concepts and expanding my thinking. Thanks Gio!

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Super happy to hear this, thank you & good job

  • @mdzahid1389
    @mdzahid1389 8 месяцев назад

    Many times I've tried and failed to understand what docker is. Now I have a basic but solid idea of what it is thanks to a PHP guide.

  • @ryanford516
    @ryanford516 2 года назад +5

    Thanks for the video, Gio! I had to take a lengthy Docker course before proceeding but I now see the utility of containerization, it's really cool.
    The only thing I still can't wrap my head around is data transfer between the server and PHP-FPM. So you've got 2 separate containers running, one with the PHP-FPM installed and the other with the server that doesn't automatically pass requests to .php files over to any interpreter. These containers essentially share one interface though, which is the src directory on the Docker host. Still I don't get the mechanics of this all. Suppose you initiate an HTTP request on your Docker host (via browser) and the destination is the loopback address with the 8000 port attached to it. The OS on the Docker host parses the request and since 8000 is the port one of our containers listens on, that container gets that request. This container is running Nginx and it sees that it's a request to a .php file. Okay, what next? In the config file it says "fastcgi_pass app:9000" so I understand that this is the part responsible for forwarding the request to the PHP interpreter. However, what does "app" stand for? Through deduction I conclude that's the reference to the container (service) running PHP-FPM but the name of that service is actually "programwith-gio" as indicated in the .yml file. So I'm confused.
    TL;DR: how does PHP-FPM communicate with Nginx when they're running in separate containers?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +3

      Glad you took the additional course for the Docker, it does come in handy. So the 'app' is not the container name but the service name, if you check the docker-compose programwithgio-app is the container name but the service name right under services is app.

    • @ryanford516
      @ryanford516 2 года назад

      ​@ProgramWithGio thank you, I'm almost finished with your truly awesome series, and I've also recommended it to my dev friends. Now I decided to backtrack some crucial things in your code that I still am not quite comfortable with in terms of understanding, however. Right now it's some of Nginx config blocks. I'd be grateful if you could point out the flaws in my logic here. So here goes.
      If you use an arbitrary endpoint to make a request to the app, e.g. localhost:8000/foo it's going to be handled by the second location block first. The request URI is /foo, and I assume that's what should be in the $query_string variable. However, the variable is empty as I checked it by sending a header with its contents back as a response via the add_header directive inside the second location block. So how does the request URI persist through to the point of being processed by index.php?

  • @cryptonyx3925
    @cryptonyx3925 Год назад

    Even after 2 years of publishing the course, I managed to ask my questions and get my problems solved via twitter and discord. I mean it is not sth u get with ANY FREE COURSE out there. I just want to say Im rly grateful...

  • @kaustavroy6542
    @kaustavroy6542 Год назад

    I know everyone already told you how good of a teacher you are. BUT i gonna say it again , YOU ARE A GREAT TEACHER , glad i found you. Thanks for theentire playlist.

  • @ilyamur885
    @ilyamur885 Год назад +1

    PHP needs courses like this!
    PHP is the king of bad learning videos and low quality infos, and I don't know actually why. So many awful code practices everywhere, so many anti-patterns (with globals, without composer, without namespaces, with mixing buisness logic with presentation layer, with only one file functions.php "for everything", etc.). This is not my first language and I see that these code practices are really bad and smelling, but many-many newbies may find it helpful...
    Gio, really thank you for such quality course. Only suggestions - please, give us more practical exercises.
    Keep up your awesome work!

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Thank you & thank you for the suggestion 🙌🙌

  • @michaeljean3507
    @michaeljean3507 3 года назад +4

    Just found you, and man i can say your way of teaching makes it very easy to follow whats going on. Thank you, I'll be following your tutorial and subscribed.

  • @shaimaal-haimi2739
    @shaimaal-haimi2739 Год назад

    شكرا لك جيو لقد كان الفصل الاول صعبا لكني سأواصل وسأقوم بأكمال جميع الفصول الى نهايتها انت الافضل

  • @migueldemaria3830
    @migueldemaria3830 3 года назад +2

    Yay, I got Docker set up thanks to Mr. Gio!

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Glad to hear that. You're welcome Miguel

  • @ChandanSomani-r5o
    @ChandanSomani-r5o Месяц назад

    Loved the way you showed the way to configure docker & php ... just clear the missing information

  • @julianvogel1277
    @julianvogel1277 2 года назад +1

    really not a friend of php. Mostly writing in NodeJs. But this series is just amazing. Love it

  • @whisperscribe
    @whisperscribe Год назад +1

    Awesome video as always, I wish all tutorials was this good.

  • @Vitalii-m6r
    @Vitalii-m6r Год назад

    I like working with Docker as I use Windows. Thanks a lot!

  • @WhiteSiroi
    @WhiteSiroi 2 года назад +1

    OMG, u r the GOAT, so helpful, loving Docker now

  • @christiansosa5484
    @christiansosa5484 Год назад +1

    So useful videos with a friendly and one step up perspective! Thanks so much

  • @muhammedatallah6863
    @muhammedatallah6863 2 года назад

    Best course I've ever seen and learned from. Thank you for that GOLD

  • @ollienicholson
    @ollienicholson 4 месяца назад +2

    @ 12:31 "Now the cool thing about whatever we did" 🤣🤣 so general, I love it

  • @gedasgedas1720
    @gedasgedas1720 3 года назад +1

    My advice would be to leave your folder structure in git for others to copy cause writing by hand can lead to typos :D I don't understand all of the things in your docker files but i think that is normal, cause I only used XAMPP and I didn't need to write anything there. Last question would be why are we writing /var/www directories in a lot of places?

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +3

      My reply was removed by RUclips. Not sure if you had the chance to see it. /var/www contains your source code in docker container but if you don't mount the volume it will just be empty. So we map the local source directory to the /var/www. Not understanding everything is perfectly normal, you'll learn along the way. If you like Docker I would suggest watching some docker tutorial and then a lot of things will make sense. You can DM me on twitter in case my reply gets deleted again if you have follow up questions. Idk what's up with RUclips deleting my replies ☹️

  • @goldfix8112
    @goldfix8112 2 месяца назад

    Yess. Ahh thats headache.. Starts from installing docker on ubuntu and continues with attempts to force it work, changing configurations that was in the video, sending energy in space and stuff like this. But now it works somehow! Almost understand how exactly. Thanks for work.

  • @nadergad8725
    @nadergad8725 3 года назад +4

    Thank you, great lessons.
    I have a suggestion:
    In new videos. If you please, make the File/ Settings/ Appearance & Behavior/ Appearance: use custom font size: 16, so the menus look a bit clearer. Also, Editor/ Color Scheme/ Cobalt, has a clearer contrast than Darcula when presenting code to others.
    Thank you again, and please keep on.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +2

      Thank you and yes I agree. I'm going to increase the font, in later videos I started zooming in on important parts but increasing font should help. Will test the cobalt theme 👍

  • @BrettRoscoe-b6t
    @BrettRoscoe-b6t 8 месяцев назад

    Like everyone else I'm also enjoying this series. I just had a couple of questions about the docker setup: (1) Why is the bind mount ("- ../src:/var/www") required for both the app and nginx services? Shouldn't it only be necessary for the app service? (2) Why is there a ".d" at the end of the nginx config path in the docker-compose.yml file? I've tried everything and it works great; I just don't understand how it works.

    • @ProgramWithGio
      @ProgramWithGio  7 месяцев назад

      Thank you.
      1. nginx might need access to the source as well to serve static assets etc
      2. Its more like a convention

  • @s4f4y4t9
    @s4f4y4t9 3 года назад +2

    Liked before watching

  • @hasnatsafder7463
    @hasnatsafder7463 Год назад

    Great tutorial, thank you so much.
    The working_dir doesn't need to be redefined in docker-compose file for app container.

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Thank you. That is correct, I just prefer to have it in both cases in case you only work with docker-compose.yml and abstract away the Dockerfile somewhere else. Just a habit I guess

  • @DMZee101
    @DMZee101 2 года назад

    Great tutorial! Gio be making me feel like a pro👍

  • @Zubbee
    @Zubbee 2 года назад

    Great. I need to watch it again so I can set docker up. I downloaded docker composer before but I don't know what went wrong. For one I didn't even know how to integrate with the any server and then I was also installing wsl2 and the whole thing made my computer so slow that I had to remove them all and technically re-install my OS. But from what you showed, it seems easy if I follow what you demonstrated (I hope).

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Fingers crossed, hopefully it works out this time 🤞

  • @rafaelmsalescom
    @rafaelmsalescom 7 месяцев назад

    Really appreciate the course. This video in particular helped me a lot.
    Thank you very much Gio!

    • @abduabdu7404
      @abduabdu7404 6 месяцев назад

      Sir, can you teach me how to download and setup docker compose and nginx the right way. i am a begginer and have been struggling with this for 3 days, i looked at many tutorials but they did not help.

    • @rafaelmsalescom
      @rafaelmsalescom 6 месяцев назад

      What problems are you having?

    • @abduabdu7404
      @abduabdu7404 6 месяцев назад

      @@rafaelmsalescom i am trying to setup and download the dockerfile, docker-compose.yml and nginx but i cannot figure it out

    • @abduabdu7404
      @abduabdu7404 6 месяцев назад

      your help would be so greatly appreciated, as i have been trying to solve this for days

    • @rafaelmsalescom
      @rafaelmsalescom 6 месяцев назад

      @@abduabdu7404 Following the video steps didn't work?

  • @lairotuT-Tutorial
    @lairotuT-Tutorial 2 месяца назад

    Hi Gio, you are a great teacher!
    In this video however I want to give my constructive mentions. While for most this kind of product information seems to be normal and just informative, my brain plays games with me in such "close-to-advertisement" features. I recognize that you prefer these products and you not only mention the benefits and features in you really fantastic way but give me and many others a clear idea of what we can expect from these. Thats great and please don't change this attitude! But would you mind to include some sort of advanced environment recommendation in general?
    However that might be because I am not a professional programmer but for me environment means feeling comfortable with a (one) solution. That has not to be all-in-one but a one(solution/combination)-for-all(long) time. I don't want to switch there and there and lose time to feel comfortable with the one and the other setting if you know what I mean. Of course and you tell this often in this video it depends on what you are working on.
    In my Idea a perfect environment would be to have the possibility to:
    - develop in the same way as I test (same IDE, same functionalities)
    - test with exactly same conditions as they run in production
    - ideally have at least one production setting on my own responsibility with the possibility to adjust this to fit to comparable production settings and to enable Closed Beta Testing.
    As I like to have the final app to have two different versions "test" and "production". I would like to have this "test" at least to have the same opportunities as full production and full development. Wouldn't it make sense then to have the development environment be the same as the production environment? And if so, why should I always use Environment for my development where everyone's clear this is for development, not for production?
    What would you recommend to me? Especially if I prefer to use free/open source products?

    • @ProgramWithGio
      @ProgramWithGio  2 месяца назад

      Thank you. Docker is the best way to achieve what you described. I just covered the basics for it since this course is not about docker but if you want to learn more you could watch some advanced Docker courses.

    • @lairotuT-Tutorial
      @lairotuT-Tutorial 2 месяца назад

      @@ProgramWithGio Thanks!

  • @mrprograming
    @mrprograming 2 года назад

    Thanks for your good teaching.
    This video was useful for me.

  • @edxkr2ym6atl66
    @edxkr2ym6atl66 2 месяца назад

    That pucture on 0:22 made my day))

  • @ernestogimeno646
    @ernestogimeno646 2 года назад +2

    Awesome course so far. Sorry if you already mentioned but I can't find it. Do you have the source code posted somewhere? I find it specially useful to copypaste the configuration files and avoid typos.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Thank you. Check description of the video, link to the source should be there

  • @josuebarros-desenvolvedorw2490
    @josuebarros-desenvolvedorw2490 3 года назад

    Thanks a lot for the wonderful video!
    I can see that I need to become good with Docker fast!

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      You're welcome. It's not that bad once you play around with it.

  • @themaridv2000
    @themaridv2000 Год назад +1

    Gio, I need your help. when i type docker-compose up in the terminal I get, "no configuration file provided: not found" I don't know what to do, I have tried everything I searched on Google except changing to linux. What should I do?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      cd into the directory that has the docker-compose.yml file and run the command from there

    • @themaridv2000
      @themaridv2000 Год назад

      @@ProgramWithGio Thank you so much man ❤you're undoubtely the best php teacher I've seen

  • @KennedyMutua-yx3vs
    @KennedyMutua-yx3vs 6 месяцев назад +1

    The latest and recommended version of the Compose file format is defined by the updated Compose Specification
    Those who might use this video,
    use “Docker compose up”
    And name your file “compose.yml” over "docker-compose.yml" even though backwards compatibility is kept
    And don’t pass a version header
    this is the updated way at time of writing

    • @abduabdu7404
      @abduabdu7404 6 месяцев назад

      Sir, can you teach me how to download and setup docker compose and nginx the right way. i am a begginer and have been struggling with this for 3 days, i looked at many tutorials but they did not help.

  • @Zubbee
    @Zubbee 2 года назад

    I'm done. My docker is up and running with all the other hassles inbtwn. Local Host is running now. Thanks a lot Gio. But if I close my text editor after the container is up will it still run? And if it doesn't still run how do I get it up again?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      That's great, good job. When you close the editor it doesn't stop containers. You need to run docker-compose down, if you want to start containers again just run docker-compose up -d

  • @sarc143
    @sarc143 11 месяцев назад +1

    When i run docker-compose up it gives me an error that says : no configuration file provided: not found

    • @ProgramWithGio
      @ProgramWithGio  11 месяцев назад +2

      cd into the directory that has the docker-compose file & run it there

  • @cryptonyx3925
    @cryptonyx3925 Год назад

    Hello
    Thank you for the great course. I've been learning for a month or so, but I could not get the docker working. Every parameter is working fine but when I reach localhost:8000 it doesnt work. Can you help me plz? ofc I have modified some addresses in your files including ../src/

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Hello. For me to be able to help I need to see the code and some screenshots. Reach out to me on Twitter and send me your Dockerfile, docker-compose and screenshot of your code structure

  • @nikolaigladchenko3182
    @nikolaigladchenko3182 3 года назад

    Great video, thanks! I was wondering why we connect the src folder to both containers?

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      One is for nginx & other is for php & php-fpm

  • @clivecorner
    @clivecorner 11 месяцев назад

    HI there Gio. I have attempted to get nginx up and running with docker. But it's not worked for me somehow. It could just be a typo. Is there any chance of zipping up the docker directory and posting it to git hub. Many many many thanks for your great teaching.

    • @ProgramWithGio
      @ProgramWithGio  11 месяцев назад +1

      You can just share your code repository that includes the Dockerfile & docker-compose as well as nginx configuration.
      Any specific errors you are facing? Try checking logs using docker logs command for nginx container

    • @clivecorner
      @clivecorner 11 месяцев назад

      Will do@@ProgramWithGio

  • @jadidlar4765
    @jadidlar4765 2 года назад

    best tutorial ever

  • @bukolatestimony
    @bukolatestimony Год назад

    Hello and thanks for this tutorial. I am just learning Nginx. Do you have a video where laravel is used with docker and apache? Can you pls point me to it?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Hey, not really, I have a video about Laravel Sail but that does not include apache.

  • @federicobau8651
    @federicobau8651 2 года назад

    best php course

  • @c0mpumast3r
    @c0mpumast3r 3 года назад

    great vid! what settings are needed for deploying php in production using docker/docker-compose?

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Thank you. That is a topic that would need it's own video. I would not recommend using development settings in production.

  • @syedmuqeet
    @syedmuqeet 2 года назад

    Thanks a lot sir. I have a question, where can we find the php.ini file or the services that we installed via docker-compose.yml file like server directory etc?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      It's usually under: /usr/local/etc/php/conf.d directory within the container. You can create a custom php.ini within your docker folder where your docker-compose.yml is for example and then modify docker-compose.yml and add the following line:
      - ./local.ini:/usr/local/etc/php/conf.d/local.ini
      under the volumes section right under where you map the source directory to the /var/www
      Rebuild the containers and it should use your custom ini. Note that your custom ini does not have to be a full PHP.ini it can just contain the changes you want to make.

  • @FranckMercado
    @FranckMercado 3 года назад

    Laracon is great but I normally use Devilbox which comes with lots of images ready to use and a nice dashboard to manage your containers projects

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      Nice. I haven't used Devilbox, but it sounds cool. Looks like devilbox uses docker.

    • @FranckMercado
      @FranckMercado 3 года назад +1

      @@ProgramWithGio give it a try.

  • @DavidKwadwoArthur
    @DavidKwadwoArthur Год назад

    How did you get the files in the docker and the src directories? What command would you run?

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      Not sure what you mean, I have all my source files on WSL & then open the directory from the code editor.

    • @DavidKwadwoArthur
      @DavidKwadwoArthur Год назад

      @@ProgramWithGio I got it figured out. The only problem is when I run localhost:8000, I get 502. Bad Gateway. How do I fix this, please?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      most likely a configuration issue. I would need to see your code & configuration to be able to assist. You can DM me on Twitter (X) your github repo link@@DavidKwadwoArthur

    • @DavidKwadwoArthur
      @DavidKwadwoArthur Год назад

      Sure. On it@@ProgramWithGio

  • @peymanGhaderkurehpaz
    @peymanGhaderkurehpaz 3 года назад +1

    That was amazing , thanks. can't wait for the other videos. May I ask you to cover things like if we set .ini php config file for this docker container , how can we do that ? And also I would like to ask, is it possible to automatically get https certificates for these nginx php docker files for production, and the last question would be is it posdible to use docker for having multiple domains on the same nginx and php server ? If you cover any of these topics , I would appreciate it.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +3

      Thank you. I'll try to squeeze another lesson on these topics. Though it will probably be in third section of the course or towards the end of second section. I personally wouldn't have two sites on same nginx container, it's simpler to just have second site with different containers on different port, so one site on port 8000, another on port 8001 and so on.

    • @peymanGhaderkurehpaz
      @peymanGhaderkurehpaz 3 года назад +1

      @@ProgramWithGio that is indeed right. Honestly the last question was maybe just for my specific case. I have a saas service which is more like a shop maker. That users can set domains for their shops. So I've been thinking about solutions that can automate this process of having many domains on the same project.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      @@peymanGhaderkurehpaz Got it, yea that makes sense. There are some services out there that let you do that and probably have API that you can integrate with to automate it.

    • @peymanGhaderkurehpaz
      @peymanGhaderkurehpaz 3 года назад +1

      Thanks a lot , I will definitely look for it ❤👌

  • @Klinoklaz
    @Klinoklaz 9 месяцев назад

    I feel like installing extensions in official php images is a lot of pain. Had to install php-redis, imagick, mysql pdo and their dependencies from like 5 different places. What's the advantage of official images, comparing to apt-ing out all the stuff in a bare linux image?

    • @ProgramWithGio
      @ProgramWithGio  9 месяцев назад +1

      Main advantages are security, consistency & most of the stuff are pre-configured. Going manual means you may need to do the configuration.

    • @Klinoklaz
      @Klinoklaz 8 месяцев назад

      @@ProgramWithGio Thank you for the answer. My main goal is to build a local dev environment quickly, and won't ship containers to production or testing yet, so that's not too bad. I think the configuration thing depends, the official image doesn't maintain extensions in one place or with one tool, and has permission issues sometime (too much security), both which I hardly encounter with an apt install

  • @pasqualealfano6652
    @pasqualealfano6652 Год назад

    Hi Gio, first of all thank you for sharing knowledge in such a shining way!
    Can you please tell me (or redirect to other resources for me to understand) how to let nginx know what we usually tell to Apache through .htaccess in order to route any request to index.php?
    Thank you in advance for any explanation/suggestion and keep up the excellent job!

    • @ProgramWithGio
      @ProgramWithGio  Год назад +2

      Hey, thank you. Check 10:06 time on this video. It's set to /var/www/public, so you place your index.php within /var/www/public & all requests go through there.

    • @pasqualealfano6652
      @pasqualealfano6652 Год назад +1

      @@ProgramWithGio many thanks for your prompt reply! Sorry for having missed the point while watching the video, previously 👌🙏

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      @@pasqualealfano6652 no worries 👍

  • @no_prplem_kpop_anime
    @no_prplem_kpop_anime Год назад

    Hello, Teacher Geo, I hope you can help me. “I have Windows 7 and I cannot install Windows 10-11 because my device is weak. I downloaded and installed dockertoolbox and downloaded the container images nginx, alpine, php, redis, but when I do the docker-compose up command in vcod, an error appears even though I wrote The file docker-compose.yml & nginx.conf & dockerfile correctly, so I decided to move to larvel homestead. What do you think of it? Will I be able to create an online store with it and transfer it to Hostinger hosting without problems? If you have another suggestion, let me know.”

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      For local development it's fine, you can try Laragon as well

    • @no_prplem_kpop_anime
      @no_prplem_kpop_anime Год назад

      That is, when I upload the site to hosting, there will be no errors and it will work well. I plan to build an online store with Larvel and React. It will not crash and will work well if I built it with Laragon.

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Not sure if Laragon is meant for production, its just a local development environment. For production you can use something like Digital Ocean & if you need help provisioning, you can use Laravel Forge.

    • @no_prplem_kpop_anime
      @no_prplem_kpop_anime Год назад

      ok, thank you

  • @ycea357
    @ycea357 Месяц назад

    I would like to use docker. But on windows it works too slow. I've got problems with installation already. It downloads very slow. So thank you for advicing laragon

    • @ProgramWithGio
      @ProgramWithGio  Месяц назад

      Yup, use whatever works best for your environment

  • @mdsirazul9231
    @mdsirazul9231 Год назад

    Hi Gio How are you? Hope you are well. Just a question, I'm new in docker. I install docker desktop, pull php and nginx image in my docker desktop, download your source code Open it VS code and run docker-compose up. it says no configuration file provided: not found, please help me?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Hello. Where are you running docker compose up from? Cd into docker directory cause that's where the docker compose file is

    • @mdsirazul9231
      @mdsirazul9231 Год назад

      @@ProgramWithGio Thank you so much Sir, you just save my day.

    • @OmarAsem26
      @OmarAsem26 7 месяцев назад

      ​@@mdsirazul9231 how did it work with you? i did all of that and got into the docker directory and ran the command docker-compose up and i'm getting this error: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
      any help from you guys would be appreciated

  • @veyspixelboy
    @veyspixelboy 2 года назад

    Hello first of all, thank you for all this courses.
    My question is about the docker, with xamp you show how to configure but with docker I try since 2 days but I am so lost.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Hello. I also show how to configure with Docker. Any specific errors/issues you are having?

    • @veyspixelboy
      @veyspixelboy 2 года назад

      @@ProgramWithGio after 5:42 minutes I cannot follow because I dont know how did you put the docker and src on the code editor.
      What condiguration you do on the doxker logiciel?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      @@veyspixelboy there are two ways you can do it. One is have your source code on your computer C drive or whatever drive, doesn't matter, and open it in editor that way. Another way is to put your source code to WSL distribution and you should be able to open that from editor as well. Having source files in WSL is better because it is faster due to less disk IO. You can try the other way first.
      Also I would recommend watching docker for beginners tutorial if you want to use Docker. If it's too much then I would just stick with XAMPP or Laragon, it doesn't matter what you use locally, use whatever makes you productive. Docker is not a requirement, I am just showing it as an alternative because we already covered XAMPP.

    • @veyspixelboy
      @veyspixelboy 2 года назад +1

      @@ProgramWithGio okei thank you so much, I wanted just follow like 100%, I am so happy of your work Thank you again

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      @@veyspixelboy no problem, good luck & thank you for following along 🙏💙

  • @MisterForgettable
    @MisterForgettable 2 года назад

    Thanks for the video man ✨

  • @sujezz
    @sujezz 2 года назад

    Would be cool to know how to use cdn with apache, everywhere I look for this there's "that's a topic for another video" but pretty much every server I work with have apache not nginx.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Whenever I say "that's topic for another video", I actually cover it in another video. I can't fit everything into one video, otherwise it would be a giant video. We used Apache in the beginning of the series & since this series is all about learning PHP "the right way" it was important to cover some alternatives to apache, so I decided to cover nginx in second section.
      We are going to work on a final project at the end of the series & deploy it. I plan on setting up CDN as well there and that's probably where I'll talk about CDN.

  • @mirkopagano8138
    @mirkopagano8138 2 года назад

    Hi, these days I am trying to configure Xdebug inside the php composer. I'm following several tutorials but none of these are exhaustive and above all working ... Do you intend to dedicate a video on Xdebug? (in my case I use vscode as ide)

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +2

      That's in my list, hopefully I'll be able to get to it. We'll see.

  • @rxxt-sh1vj
    @rxxt-sh1vj 3 года назад +1

    Laragon is Better than XAMPP , WAMP or any other Server. You can also switch versions easily..Its most upgradable as you can always update PHP, SQL or Apache Version in Laragon. Whats your suggestion on that @GioDev

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +2

      Laragon is certainly better than XAMPP. I personally prefer docker because I work on multiple projects at the same time & also like to have projects separated by their dependencies in separate containers. If I were not using docker I would be using Laragon for sure.

    • @rxxt-sh1vj
      @rxxt-sh1vj 3 года назад

      @@ProgramWithGio :D

    • @rxxt-sh1vj
      @rxxt-sh1vj 3 года назад

      Bro I also wanna know what's the difference between using Laravel Relationship like hasMany....belongsTo etc versus using a raw SQL join statement.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +2

      @@rxxt-sh1vj this video isn't about Laravel though 🙂. But using query builder will be faster than eloquent, though this depends on your query and how complex it is. Sometimes this speed gain with query builder is negligible. I haven't had any issues with eloquent in terms of performance, only few cases where I had to use query builder. So it depends on your case.

    • @rxxt-sh1vj
      @rxxt-sh1vj 3 года назад +1

      @@ProgramWithGio I am developing my own ORM...so wanted to know the difference..:D I will be using Joins using my custom query builder..My orm can insert 10,000 records in 1.2 seconds and 1000 records in 0.17ms in mysql database

  • @cpanagoulias
    @cpanagoulias 2 года назад

    Great video Gio! Could you do a short one with xdebug capability inside the container some time please?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Thank you. I have xdebug video planned, hopefully I'll get to it soon

  • @jeevachaithanyansivanandan
    @jeevachaithanyansivanandan 3 года назад +1

    Thanks for the video

  • @ינוןאלבז-כ1ז
    @ינוןאלבז-כ1ז 2 года назад

    great lesson!

  • @tedybg
    @tedybg 2 года назад

    Hi Gio, can you recommend a good docker course for beginners? (short and synthesized like yours)

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +4

      Hello. Techworld with Nana is a good channel. She has a 3hr course on Docker I believe.

  • @asmotovlogs228
    @asmotovlogs228 Год назад

    Hi, Jio. I'm using Xampp. Is there any need for using Docker to complete this series?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      You can keep using XAMPP if that's what you are comfortable with

  • @Sasha-li2bn
    @Sasha-li2bn 2 года назад +1

    Hi Gio, I''ve tripple checked the code and it seems to be the same as yours. Running docker-compose up in terminal was a success and now when I go to localhost:8000 I get a 404 not found /nginx message which is good I guess because I got the containers running but I can't execute anything from index.php.
    Any idea what might be the problem?
    (Just localhost doesn't work at all unless XAMP is on which makes sense to me..:D)
    I get this in my terminal everytime I try to connect:
    | 172.18.0.1 - - [10/Jan/2022:17:30:57 +0000] "GET / HTTP/1.1" 404 556 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gec
    ko) Chrome/97.0.4692.71 Safari/537.36"

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Can you share the nginx.conf & docker-compose as well as Docker file screenshots? You can send them on Twitter if you want and I can take a look.

    • @Sasha-li2bn
      @Sasha-li2bn 2 года назад

      @@ProgramWithGio Sent!

    • @Sasha-li2bn
      @Sasha-li2bn 2 года назад +1

      SOLVED VIA TWITTER: My Index.php was located in the SRC folder only. I did not have it in the PUBLIC folder and the nginx config points to the PUBLIC folder.

    • @benjaminvenezia1944
      @benjaminvenezia1944 2 года назад

      @@Sasha-li2bn Same issue, add a public folder. src/public/index.php 🌸

  • @yassinezidane3888
    @yassinezidane3888 Год назад

    wow ty aloot Gio u are t best ,i hope u make a video nginx enable https with dockerfile and php

  • @vinsouz
    @vinsouz 3 года назад

    Thank you for your job!

  • @Flo-mz8ct
    @Flo-mz8ct Месяц назад

    I hope I can finish you php tutorial at some point and then your hopefully finished laravel tutorial.
    Atm I do a lot of python, data science / AI stuff, I just can't find the time :'(

  •  2 года назад

    Good video... thanks for your work. have you looked at the dddev project on this topic? For local projects I love ddev because it is Docker based and comes with some nice options and great features. This project is made for php developers like us…maybe another interesting idea for a short video?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Thank you. No, I have not looked at ddev project, thanks for the suggestion

  • @drgregoryhouse1470
    @drgregoryhouse1470 Год назад

    I did not quite understand why there are two seperate containers for the application and for the apache daemon. If i understand the .yml file correctly, the whole project will be mounted into the nginx container and the nginx deamon will process all the requests. And also the whole project will be mounted in the app container. Since the nginx container will not access files from the nginx container, I don't understand whats the purpose of the app container in the first place.
    Thanks in advance ! :)

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      Don't forget about fpm, nginx is just webserver

  • @EuegenTv
    @EuegenTv 2 года назад

    really good course!!

  • @drgregoryhouse1470
    @drgregoryhouse1470 2 года назад

    When developing in docker, how do you autoreload your browser on filechanges ?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      You mean hot reload? I have not set that up with Docker, so I'm not sure to be honest.

    • @drgregoryhouse1470
      @drgregoryhouse1470 2 года назад

      @@ProgramWithGio yes I meant hotreload, smashing F5 is not elegant :D
      btw your response time is awesome.
      A rough workaround could be adding header("Refresh:1"), so the page refreshes itself. Can be problematic at some point I guess.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      @@drgregoryhouse1470 Vite has that built in I think for front-end, so you could give it a try. Yea adding refresh every second isn't that good, will become annoying very fast 😁

  • @hohojimmy4443
    @hohojimmy4443 3 года назад

    In traditional way if your nginx config file have error you must uninstall it sometime will raise error.But in docker you can delete it easily.

  • @maxwell.6374
    @maxwell.6374 2 года назад

    Hi, can you explain how to run code from GitHub and connect everything to Docker in Windows? I tried docker-compose up in terminal, but all I get is error "no configuration file found".
    I'm thinking that maybe workdir isn't correct, but I don't know to what I need to change it to work.
    Thanks in advance!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      You need to execute docker-compose command where the docker-compose.yml is in. So cd in that directory and the run docker compose command

    • @maxwell.6374
      @maxwell.6374 2 года назад +1

      @@ProgramWithGio Thank you! That was really helpful, now I can proceed following this amazing tutorial.

  • @samduss4193
    @samduss4193 Год назад

    Wow so far i only played with Xamp, when i run on this tutorial i feel like i receive a Rock on my Face.. hahaha impossible to graps that in 15min hahahha... will go over tutorial and tutorial later about it since docker is not essential to keep going in the course i hope lol ;)

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      That's understandable and it's ok. Docker is not a requirement, keep using XAMPP or whatever makes your more productive 🙌

  • @zmOe1
    @zmOe1 2 года назад

    was my comment deleted?
    with me comes an error and was after I enter docker-compose up comes the error
    ERROR: The Compose file '.\docker-compose.yml' is invalid because:
    'nginx' does not match any of the regexes: '^x-'

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      RUclips sometimes removes comments if it thinks it's a spam. Looks like an error in docker-compose. Compare it to my file and see the difference.

  • @akhileshkumar-iu9uq
    @akhileshkumar-iu9uq 3 года назад

    What are the technologies needed to build microservice with php

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      That is a broad question :). Depends on the application & goals/needs

  • @AmitGupta-cc9fk
    @AmitGupta-cc9fk 8 месяцев назад

    Sir, I have a problem, Docker is running fine but unable to access localhost:8000, please advice.

    • @ProgramWithGio
      @ProgramWithGio  8 месяцев назад

      Check docker logs and confirm both nginx & fpm container are running

    • @adamw6893
      @adamw6893 Месяц назад

      I had this problem too - make sure the nginx.conf root and docker-compose volumes use the same location, they should both be /var/www. The nginx.conf was incorrectly set to var/www/public

  • @gatovsky
    @gatovsky 2 года назад

    why nginx service not have a build context like app services?

  • @alnahian2003
    @alnahian2003 Год назад

    0:27... "And that's how docker was born" 😂

  • @akinniyiakinpelumi8515
    @akinniyiakinpelumi8515 2 года назад

    Can I use php in-built server on php-fpm in docker without using Nginx as server?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      I'm not sure to be honest, I have not used php's built-in server.

  • @plurkpasserby
    @plurkpasserby 2 года назад

    any idea how to increate the memory limit of this ?. because I cannot find the php.ini in your tutorial...how to set that in docker?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      You will need to create php.ini in docker directory for example & copy it over from either Dockerfile or docker-compose. Google "custom php.ini docker-compose"

  • @ZeppGoesPro
    @ZeppGoesPro 2 года назад

    It was such a story... I was using Windows 8.1 while going through the first section of the course until now. But Docker require Windows 10 (now i know why). I tried to get it upgrading Window 8.1 to Windows 10, but it not worked out because of some error i dunno how to handle. So i got Windows 10 and install it to another disk section of my notebook. Than i installed Docker and it asked me to go through some Microsoft instraction first. While he needed only part of that instruction to be completed, i didn't know this those time, so i passed through all instruction and get fully upgraded Ubuntu 22.04, ha-ha-ha.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      Wow what a journey heh. Sorry you had to go through all that, hope it's all good now 🙏

    • @ZeppGoesPro
      @ZeppGoesPro 2 года назад

      @@ProgramWithGio it's alright! I have more of that story but youtube delete it, i don't know why.
      Finally i get it to the lesson, made all the stuff and met the error. Checked everything, didn't find anything wrong, so i created REPOSITORY account to put all the files and images into it and to show it to you. Doing this i found the error, so my Docker started working. However he did it wrong so i continued with REPOSITORY and found the error again. Now all is working as intended!

    • @ZeppGoesPro
      @ZeppGoesPro 2 года назад

      @@ProgramWithGio Amazing! RUclips bans name of the you know what repository!
      Epilogue: now i have Windows 10, WSL2, Linux, Docker, REPOSITORY, all relevant extensions for VS Code! Nothing can get me off my course - once i become great IT-specialist and leave Russia for good!
      Thx u master Gio! You not only teach us the php, you teach us much much more!
      Now i done with that comment =)))

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      @@ZeppGoesPro RUclips sometimes removes comments, probably thought it was a "spam" or something. Glad it's all working now, awesome job 👍

    • @ZeppGoesPro
      @ZeppGoesPro 2 года назад

      @@ProgramWithGio he bans Git*** name 😂

  • @roilhifrajoibarrahernandez2124
    @roilhifrajoibarrahernandez2124 2 года назад

    I've downloaded github repo, but not working... 502 bad gateway error... can you help me?

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Sure, ping me on Twitter and I can help troubleshoot the issue

  • @dev_troy8903
    @dev_troy8903 10 месяцев назад

    I often hear about vanilla javascript, vanilla php, vanilla linux. what does the term vanilla mean ??

    • @ProgramWithGio
      @ProgramWithGio  9 месяцев назад +1

      Means without frameworks/libraries, vanilla PHP is just plain PHP

  • @DigitaSkills101
    @DigitaSkills101 2 года назад

    Should we always redirect all requests to index file

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Its up to you, though its good practice to have a single entry to the application.

  • @int21
    @int21 3 года назад

    HI, great tutorial. I followed it 99%. Only change it to pick alpine version. But I onnly can get nginx welcome page there's no way index.php can be reached by nginx...

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Thank you. Can you share your Dockerfile, nginx config & docker-compose? I can take a look and help you. Did you set document root correctly?

    • @int21
      @int21 3 года назад

      @@ProgramWithGio Hi thank for your quick answer. my Dockerfile, nginx config & docker-compose file are same to your tutorial. I'm using an ubuntu distro that I had installed from Microsoft store, could it be that the reason?
      note: sure you'll find my "english" very bad, sorry in advance
      here some screenshot
      prnt.sc/14dtwgx
      prnt.sc/14dty8k

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      @@int21 where is your index.php located, since you are seeing nginx welcome page it means nginx is running, so issue most likely is with your source not being mapped to proper directory. Make sure you adjust the docker-compose file on the volume section to map to your source code. You can DM me on twitter and we can continue there to troubleshoot it. I'm sure it's just the confirmation issue.
      P.S. your English is good, don't worry 🙂

    • @int21
      @int21 3 года назад

      @@ProgramWithGio Hi my friend, my index.php is inside /src/public. I'm suspecting that nginx is reading default.conf file and not my nginx.conf file.
      about docker-compose file
      this is app volumens definition:
      - ../src:/var/www
      and nginx volumens definition:
      - ../src:/var/www
      - ./nginx/:/etc/nginx/config.d
      here screenshot of my folder structure
      prnt.sc/14dx4ei
      thanks for taking the time for this

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      @@int21 try removing the last slash from ./nginx/ and just leave as ./nginx, if still doesn't work try mapping file directly instead of folder. I'll try to reproduce your issue on my PC and see what the issue is. Make sure to run docker-compose up --build to rebuild image after making changes

  • @expresscoding3525
    @expresscoding3525 Год назад

    Sir, can we follow the course on XAMPP, by not using Docker ?

  • @b4rt1j1
    @b4rt1j1 2 года назад

    Great tutorial, however after 15 hours trying to simply run apache with database through docker I've realized that docker is such pain in the a$$ encountering errors all the time.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад +1

      I know Docker can be a pain, especially on windows

  • @omodev4427
    @omodev4427 9 месяцев назад

    How can i create a docker image with Microsoft sql server, with exensions enabled php8, nginx? some one help please.

    • @ProgramWithGio
      @ProgramWithGio  9 месяцев назад

      Through a command & some configuration most likely. Do research in google on "install microsoft sql server in docker" & try few options

    • @omodev4427
      @omodev4427 9 месяцев назад

      I have tried several commands on Google but non works . I thought you could share a working command

  • @matiasvargas3707
    @matiasvargas3707 Год назад

    Hi Gio how are you? just a question, is it necessary to have a dockerfile for each image before using docker compose? because i tried, i have a dockerfile for php, nginx and mysql, but the nginx container keeps restarting all the time, and now i saw that you didn't create the nginx dockerfile. Thanks in advance! and sorry if i hadn't smashed the like button on all your videos, they're like drugs and i don't even realize when i'm in a new one :( lol

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Hey, I'm good, thank you. How are you?
      You need some sort of base image, you dont need to have separate Dockerfiles, can just use the existing images for MySQL for example.
      If you share your code I can help troubleshoot it. Put it up in GitHub and send me the link in Twitter as well as screenshot of the issue.

  • @tanzimibthesam5861
    @tanzimibthesam5861 2 года назад

    Awesome can you show one how to in stall Laravel with docker without sail

  • @estudiowebdiezmilseres8543
    @estudiowebdiezmilseres8543 2 года назад

    ¡Gracias!

  • @allantidalgo4651
    @allantidalgo4651 Год назад

    Sir how can we install php nginx with docker in windows 10 as you did in Linux?

  • @sym2574
    @sym2574 Год назад

    Is this episode considered advanced level ? I do not understand most of it , Should I watch it more than one?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      This is considered intermediate, Section 1 is basic, Section 2 OOP (intermediate), Section 3 Advanced. Docker is not a requirement, its just an alternative to XAMPP, feel free to keep using XAMPP or Laragon depending on what you are currently using. You can come back to Docker later.

    • @sym2574
      @sym2574 Год назад

      @@ProgramWithGio got it 😁

  • @marvic000
    @marvic000 2 года назад

    What if i want to use apache2 as my web server how should i edit my docker file can someone help? hew to using docker, thanks!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      It should be pretty similar to the way I did it in this video. Google docker with PHP & apache and you will find many articles.

  • @Mathias-cq3zo
    @Mathias-cq3zo 3 года назад

    I tried to replicate this but fail :(. My app has a button which call a bash script. I set "everything right", however when I click this button my container log says """"sh: 1: path/to/script.sh: not found"""" eventhough the path is correct... 😵. Do I have to set special permission to Nginx ?

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      Not sure I understand what you mean by a button. Why do you need a button in your app to run a bash script? Is your docker set up properly?

    • @Mathias-cq3zo
      @Mathias-cq3zo 3 года назад

      @@ProgramWithGio it is a button on the frontend that call a php function to do some backend validation and then execute a script that do a "git clone" in order to bring an excel file from a repo on gitlab. However everything in the function called does well except executing the script. Thanks in advance!

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +1

      It's hard to know what the problem is without looking at the code. It doesn't sound like a docker issue.

  • @saimoralam5647
    @saimoralam5647 3 года назад

    HI! i am new and learning PHP from your chanel I have tried but couldn't run docker container properly i am using Windows 10 and installed docker successfully. and i can't understand the error also i have googled the error but couldn't solve it. The error is, nginx: [emerg] unknown "documnet_root" variable

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Hey, looks like it might be an issue with your nginx configuration. Can you share your nginx config file?

    • @saimoralam5647
      @saimoralam5647 3 года назад

      @@ProgramWithGio
      #nginx.conf file
      #---------------
      server {
      listen 80;
      index index.php;
      error_log /var/log/nginx/error.log;
      access_log /var/log/nginx/access.log;
      error_page 404 /index.php;
      root /var/www/public;
      location ~ \.php$ {
      try_files $uri = 404;
      fastcgi_pass app:9000;
      fastcgi_index index.php;
      include fastcgi_params;
      fastcgi_param SCRIPT_FILENAME $documnet_root$fastcgi_script_name;
      }
      location / {
      try_files $uri $uri/ /index.php?$query_string;
      gzip_static on;
      }
      }
      #docker-compose.yml file:
      #------------------------
      version: '3.8'
      services:
      app:
      build:
      context: ./
      dockerfile: Dockerfile
      container_name: docker-app
      restart: always
      working_dir: /var/www
      volumes:
      - ../src:/var/www
      nginx:
      image: nginx:alpine
      container_name: docker-nginx
      restart: always
      ports:
      - "8080:80"
      links:
      - app
      volumes:
      - ../src:/var/www
      - ./nginx:/etc/nginx/conf.d
      #Dockerfile
      #----------
      FROM php:8.0.3-fpm
      MAINTAINER Saimor
      RUN apt-get update && apt-get install -y \
      git \
      curl \
      zip \
      unzip
      WORKDIR /var/www