0.0.2 ⢠Published 4 years ago
docker-php v0.0.2
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 phpAbout
Will add all the necessary configurations to your npm project for running your PHP code locally:
- Adds a
dockerfolder withDockerfileanddocker-compose. - Adds some useful scripts to your
package.jsonfile. - 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/