Skip to content

Helps beginner or anyone who want to try and experiment PHP without installing any complicated app like Nginx, Apache, Wampserver, etc.

Notifications You must be signed in to change notification settings

syamsoul/docker-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker PHP

This repo will helps anyone to start their PHP development or even beginner to start to learn and experimented PHP without installing complicated app/software such as WampServer, Nginx, Apache, etc.

No need to worry if you have ZERO knowledge about Docker. You still can use this.




Requirement

  • Docker

Yes, it only require Docker to run PHP web and CLI.



How to Use


Basic Usage

⚠️ First, please make sure NO other app use 80 port, otherwise, it will not works. (e.g: disable WampServer or disable apache/nginx)

  1. git clone https://github.com/syamsoul/docker-php.git <YOUR_APP_FOLDER_NAME>
  2. cd <YOUR_APP_FOLDER_NAME>
  3. sh soul up

That's it, you can now access your PHP website by entering http://php.localhost in your browser.


Customize Website

  1. You can customize your website in ./src folder.
  2. http://php.localhost will only look into ./src/public.

You can try edit ./src/public/index.php file and access http://php.localhost to see the changes.

Default accessible page
  • http://php.localhost (Homepage)
  • http://php.localhost/about-us/ (About Us page)
  • http://php.localhost/simple.php (directly render php file)

Soul Command

sh soul <COMMAND>
#example: sh soul up
#example: sh soul composer init
COMMAND Description
up Create and run www service
down Stop and delete www service
restart Recreate and restart www service
shell Access shell of www container
root-shell Access shell of www container with root privilege
composer Run composer command inside www container
cli Access PHP-CLI of www container
exec Run docker compose exec



Support me

If you find this repo helps you, kindly support me by donating some BNB (BSC) to the address below.

0x364d8eA5E7a4ce97e89f7b2cb7198d6d5DFe0aCe



About

Helps beginner or anyone who want to try and experiment PHP without installing any complicated app like Nginx, Apache, Wampserver, etc.

Resources

Stars

Watchers

Forks

Packages

No packages published