ashishtiwari1993 / ashish.one

Source code for my personal website.
https://ashish.one
4 stars 4 forks source link

[Part 1] Setup LEMP environment with Docker - Setup Nginx and PHP | ashish.one #8

Closed utterances-bot closed 2 years ago

utterances-bot commented 2 years ago

[Part 1] Setup LEMP environment with Docker - Setup Nginx and PHP | ashish.one

Hi guys, In this series, we are going to setup LEMP Stack (Linux, Nginx, MySQL, PHP). Mainly it is used by web developers. I am assuming you have a basic idea about Docker & How it works. In this blog, We are going to setup PHP and Nginx. Why Docker? I will not go too much deep, You can find more resources over the internet about the docker. Docker makes the installation process very smooth and it gives your isolated environment as the container.

https://ashish.one/blogs/part-1-setup-lemp-environment-with-docker-setup-nginx-and-php/

TryToLearnProgramming commented 2 years ago

please explain why you open PHP port 9000 and the nginx config line fastcgi_pass php:9000;

ashishtiwari1993 commented 2 years ago

@TryToLearnProgramming

Thanks for raising this. Yes we don't need to expose 9000 port. This was error from my side.

docker-compose.yml simply could be like below:

version: '3'

services:
 web:
  image: nginx
  ports:
   - "80:80" 
  volumes:
   - ./public_html:/public_html
   - ./nginx_conf:/etc/nginx/conf.d
   - /tmp/nginx_logs:/var/log/nginx 
  networks:
   - nginx-php

 php:
  image: php:7.2-fpm
  volumes:
  - ./public_html:/public_html
  networks:
  - nginx-php

networks:
 nginx-php:

Let me change in my blog as well :)

TryToLearnProgramming commented 2 years ago

Hello Ashish, Thank you for your reply. Can I join you in linkdin? You can share your link with me, or https://www.linkedin.com/in/er-sami-banerjee-852214114 this is my profile link. Hope you will reply me soon.

On Wed, 9 Feb 2022, 20:09 Ashish Tiwari, @.***> wrote:

@TryToLearnProgramming https://github.com/TryToLearnProgramming

Thanks for raising this. Yes we don't need to expose 9000 port. This was error from my side.

docker-compose.yml simply could be like below:

version: '3' services: web: image: nginx ports:

  • "80:80" volumes:
  • ./public_html:/public_html
  • ./nginx_conf:/etc/nginx/conf.d
  • /tmp/nginx_logs:/var/log/nginx networks:
  • nginx-php

    php: image: php:7.2-fpm volumes:

    • ./public_html:/public_html networks:
    • nginx-php networks: nginx-php:

Let me change in my blog as well :)

— Reply to this email directly, view it on GitHub https://github.com/ashishtiwari1993/ashish.one/issues/8#issuecomment-1033830877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM3KMXRYOG4VNCV63Y4SA3TU2J4CZANCNFSM5N5FVXOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

ashishtiwari1993 commented 2 years ago

Yeah sure :)

On Thu, 10 Feb, 2022, 23:52 Sami-Jee, @.***> wrote:

Hello Ashish, Thank you for your reply. Can I join you in linkdin? You can share your link with me, or https://www.linkedin.com/in/er-sami-banerjee-852214114 this is my profile link. Hope you will reply me soon.

On Wed, 9 Feb 2022, 20:09 Ashish Tiwari, @.***> wrote:

@TryToLearnProgramming https://github.com/TryToLearnProgramming

Thanks for raising this. Yes we don't need to expose 9000 port. This was error from my side.

docker-compose.yml simply could be like below:

version: '3' services: web: image: nginx ports:

  • "80:80" volumes:
  • ./public_html:/public_html
  • ./nginx_conf:/etc/nginx/conf.d
  • /tmp/nginx_logs:/var/log/nginx networks:
  • nginx-php

php: image: php:7.2-fpm volumes:

  • ./public_html:/public_html networks:
  • nginx-php networks: nginx-php:

Let me change in my blog as well :)

— Reply to this email directly, view it on GitHub < https://github.com/ashishtiwari1993/ashish.one/issues/8#issuecomment-1033830877 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AM3KMXRYOG4VNCV63Y4SA3TU2J4CZANCNFSM5N5FVXOQ

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/ashishtiwari1993/ashish.one/issues/8#issuecomment-1035284597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXOLMQIUCFFW6V3NTRKFR3U2P663ANCNFSM5N5FVXOQ . You are receiving this because you commented.Message ID: @.***>