Skip to content

PHP development environment for Docker

License

Notifications You must be signed in to change notification settings

constlab/docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker php

PHP development environment for Docker.

  • PHP 7.1
  • Nginx
  • php-fpm
  • MySql
  • Composer
  • WP CLI
  • Nodejs (optionnal)
  • Gulp CLI (optionnal)
  • Envoy (optionnal)

Install

  • Clone this repo in your project: git clone https://github.com/constlab/docker.git .docker or add as submodule git submodule add https://github.com/constlab/docker.git .docker
  • Copy cmd file in current folder: cp .docker/docker .
  • In project folder must be env file with params: APP_NAME, DB_DATABASE, DB_USERNAME, DB_PASSWORD, DB_HOST, DB_PREFIX
  • If env file does not exists, copy it: cp .docker/env.example .env
  • Let's start. Run ./docker. Start params can see in ./docker file
  • Open browser with address: http://localhost:8080

Commands

  • ./docker – start containers
  • ./docker stop
  • ./docker restart – stop and start containers
  • ./docker exec – run command in php container. Example: ./docker exec composer update
  • ./docker bash – get a shell docker container
  • ./docker build
  • ./docker rebuild
  • ./docker wp – get wp cli