docker-php
v0.0.2
Published
🐋 A simple PHP environment with Docker for local development.
Downloads
3
Readme
Docker & PHP (for local development)
🐋 A simple PHP environment with Docker for local development.
Requirements
Install
# install docker-php
# (not npm, npx!)
npx docker-php@latest
# start the PHP server on port 3200
# (http://localhost:3200/)
npm run php
About
Will add all the necessary configurations to your npm project for running your PHP code locally:
- Adds a
docker
folder withDockerfile
anddocker-compose
. - Adds some useful scripts to your
package.json
file. - Adds
/src/index.php
(if it does not already exist).
Production
Deploy with
docker-compose
:
How to deploy on remote Docker hosts with docker-composeWant to use
docker stack deploy
? (recommended)
https://docs.docker.com/engine/swarm/stack-deploy/