Docker running Nginx, PHP-FPM, Composer, MySQL and PHPMyAdmin.
Before installing project make sure the following prerequisites have been met.
We’ll download the code from its repository on GitHub.
[Optional]
We'll generate and configure SSL certificate for nginx before running server.
[Optional]
We'll configure Xdebug for IDE (PHPStorm or Netbeans).
By this point we’ll have all the project pieces in place.
[Optional]
When developing, you can use Makefile for doing recurrent operations.
When running, you can use docker commands for doing recurrent operations.
To run the docker commands without using sudo you must add the docker group to your-user:
sudo usermod -aG docker your-user
For now, this project has been mainly created for Unix (Linux/MacOS). Perhaps it could work on Windows.
All requisites should be available for your distribution. The most important are :
Check if docker-compose is already installed by entering the following command :
which docker-compose
Check Docker Compose compatibility :
The following is optional but makes life more enjoyable :
which make
On Ubuntu and Debian these are available in the meta-package build-essential. On other distributions, you may need to install the GNU C++ compiler separately.
sudo apt install build-essential
You should be careful when installing third party web servers such as MySQL or Nginx.
Do not modify the `etc/nginx/default.conf` file, it is overwritten by `etc/nginx/default.template.conf`
Edit nginx file `etc/nginx/default.template.conf` and uncomment the SSL server section :
```
# server {
# server_name ${NGINX_HOST};
#
# listen 443 ssl;
# fastcgi_param HTTPS on;
# ...
# }
```
Get your own local IP address :
```
sudo ifconfig
```
2. Edit php file etc/php/php.ini and comment or uncomment the configuration as needed. 3.
Set the `remote_host` parameter with your IP :
```
xdebug.remote_host=192.168.0.1 # your IP
```