Download the PHP package madsem/phpdock without Composer
On this page you can find all versions of the php package madsem/phpdock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download madsem/phpdock
More information about madsem/phpdock
Files in madsem/phpdock
Package phpdock
Short Description Simple Docker dev environment for PHP based projects
License MIT
Informations about the package phpdock
phpDock
Docker Compose environment, based on Alpine Linux.
Made to be a very fast & simple macOS php development environment.
Spin up a new environment in <= 10 seconds
(after you have the base images downloaded)
Including:
php-fpm
, MySql
,, Singlestore
, Redis
, Nginx
, Mailhog
, Composer
, node
, npm
& yarn
Deafults to Singlestore DB.
Local Addresses
- Mailhog:
- Singlestore UI:
Docker Config
Docker environment can be configured in .env.phpdock
.
Easily swap out images and configure docker separate from your application .env
.
Use any of these in .env.phpdock
, to customize your environment:
- PHP-fpm: 8.3-latest
- MySql Server: any valid mysql tag between 5.7 - 8.x
- singlestore: always latest version
- redis: always latest version
To customize more, you can always edit the docker-compose,yml
.
Install
Then run vendor/bin/phpdock publish
, to publish the docker/
folder and phpdock files into your project directory.
Then you can start using the executable shell script like so:
Create an Alias
Start a new Project
This will build the containers for your project.
After the containers are ready, run phpdock up
to start the containers.
Then you can log into the app
, nginx
, mysql
or redis
services as follows:
To shut down but not destroy your work, run phpdock down
,
or to destroy the containers, images and associated volumes phpdock destroy
.
To rebuild containers after config changes, run phpdock rebuild
:
Update phpDock
This will publish the new phpdock files, and append .bak
to old files & the docker
directory.
For more commands, run phpdock help
.
Example For a Laravel Project
Laravel env file using the phpdock default configuration:
Config for Mysql:
Database Manager
Connect to DB Management software like TablePlus, like this:
phpDock Base Image Extensions Included:
Install Custom PHP Extensions:
phpDock uses https://github.com/mlocati/docker-php-extension-installer#supported-php-extensions to install extensions.
This package detects your PHP version and installs the correct version.
Simply add additional extensions or modifications to the docker/app/Dockerfile
, like this:
Hat Tips :shipit:
- Chris Fidao && Vessel
- Yuki Imamura && Docker Laravel