Download the PHP package dannyxcii/phpenv without Composer
On this page you can find all versions of the php package dannyxcii/phpenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dannyxcii/phpenv
More information about dannyxcii/phpenv
Files in dannyxcii/phpenv
Package phpenv
Short Description Easily spin up Docker containers for local PHP development.
License GPL-3.0-only
Informations about the package phpenv
PHPEnv
A global Composer package for easily creating Docker containers for local PHP development. Allows you to set up containers on a project by project basis.
Easily create Docker containers configured for development with Laravel, Symfony or plain vanilla PHP, with the following services:
- Nginx
- MySQL 8
- PHP 8.3 including OpCache and XDebug
- Redis
Installation
Pre-requisites:
You will need the following installed before you can make use of PHPEnv:
- Composer
- Docker Desktop
Then download and install PHPEnv globally:
To confirm that the package is installed successfully, run the phpenv
command which
will list the help text.
Usage
To run phpenv
commands, ensure Docker Engine is running.
Build
To build a new container for a project you can run the following command:
This will build a new container for your project and serve files from your-project-root/public
at http://localhost:<port>
with the port being a randomly assigned port. Once built your containers ports are static and will not change upon restarting
your container.
Your database container name and IP can be found in Docker Desktop or by running the relevant Docker commands. Root
credentials are root:docker
.
Other Commands:
phpenv help
- Displays a list of available commands.
phpenv show
- Display a list of environments created with phpenv.
phpenv start <name>
- Starts a container by saved name. Pass the name you used when running the build command.
phpenv stop <name>
- Stops a running container by saved name.
phpenv destroy <name>
- Destroys a container by saved name.
phpenv attach <name>
- Attach to the bash terminal within your projects container.