This docker configuration is designed for webapps based on PHP. It's includes composer to manage PHP-Libraries, node.js with yarn to manage JS-Libraries for frontend and deployer.php to deploy your porject on your server.
Supported PHP-Versions:
- 7.1
- 7.2
- 7.3 (without xDebug)
Following programs are required to use Docker Builder.
Optional:
- docker-sync (for OS X only. It speed the transfer of files between host and vm up)
- Clone this project and remove
.git
or download the archive and unpack it. - Update or project shortcut at
/docker/.env.dist
(PROJECT=np
). - Choose your favorite PHP-Version in row three at the same file.
- Remove unused nginx-configs (
*.dist
) from/docker/nginx/
. - To start this docker-container go in the folder
docker
and run./docker.sh -l
. The Argument-l
logged you in this container. - Run
composer
for to install your favourite framework & libraries
You can access the project-terminal with the script /docker/docker-ssh.sh [username]
. The argument username is optional and can be used, to grant root rights. In default you will logged in with user www-data
.
- Open
Run/Debug Configuration
and addPHP Remote Debug
. - Choose a name for your configuration.
- Activate checkbox
Filter debug connection by IDE key
. - Set
IDE key
toPHPSTORM
. - Open server-settings with click of the button
…
. - Add a new server.configuration.
- Named the server
docker-localhost
. - Set the host to
localhost
or the domain you choosed for your local docker-project. - Set the port to 8080 and activate
Use path mappings
. - Map the directory
www
to/var/www/html/www
and save your configuration.
Now you can use PhpStorm for debugging http-requests and cli-php-scripts on your docker-maschine.