GithubHelp home page GithubHelp logo

majuansari / docker-phpdev Goto Github PK

View Code? Open in Web Editor NEW
75.0 2.0 9.0 126 KB

Easy to use php docker development environment setup with vhost/multi version support

License: MIT License

Shell 96.63% Nginx 3.27% PHP 0.10%
docker lemp php-docker docker-phpdev php-fpm vhost image docker-container

docker-phpdev's Introduction

docker-phpdev helps you to setup a php development environment using Docker

Features

- Easy setup of lemp & lamp environments
- Easy vhost setup
- Try out multiple versions of php & mysql
- Useful services and extensions added
- Low size containers
- Only ubuntu 16.04 or alpine are used as base images

Containers

- mysql[5.5, 5.6, 5.7 & 8.0 DR]
- apache2
- nginx
- php [5.6, 7.0 & 7.1]
- phpmyadmin
- sonarqube
- redis
- memcached
- mailcatcher
# Setup LAMP environment
git clone https://github.com/majuansari/docker-phpdev.git
cd docker-phpdev

//Start lamp environment using short key
docker-compose up -d lamp

//Start lamp environment by specifying services
docker-compose up -d mysql apache2 php-fpm

# Setup LEMP environment
git clone https://github.com/majuansari/docker-phpdev.git
cd docker-phpdev
//Start lemp environment using short key
docker-compose up -d lemp

//Start lemp environment by specifying services
docker-compose up -d mysql nginx php-fpm
# Add vhosts

For adding vhosts create conf files in docker/apache2/conf for apache2 and docker/nginx/sites for nginx

# Configure services versions and passwords

You can easily change service versions or default passwords by editing .env file

Container Command
php-fpm docker-compose up -d php-fpm
apache2 docker-compose up -d apache2
nginx docker-compose up -d nginx
mysql docker-compose up -d mysql
sonarqube docker-compose up -d sonarqube
phpmyadmin docker-compose up -d phpmyadmin
redi docker-compose up -d redis
mailcatcher docker-compose up -d mailcatcher
memcached docker-compose up -d memcached
lamp docker-compose up -d lamp
lemp docker-compose up -d lemp
Commands Description
docker-compose build Build the entire stack
docker-compose build {container} Build just the specified container
docker-compose up -d Start the entire stack
docker-compose up {container} Start just the specified container
docker-compose stop Stop all the containers related to the docker-compose

alt tag

References

  1. Docker for php developers
  2. PHP Web development with docker
  3. webdevops docker
  4. laradock
  5. php-dockerized

docker-phpdev's People

Contributors

majuansari avatar thomaslorentsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-phpdev's Issues

Composer

Hi, just out of curiosity, should I run composer install inside the container or outside?

Switch php version

Hi, I'm new to Docker, forgive me if this is not the correct place to ask.

I installed your build and can run it just fine. However I'm trying to switch the php to version 5.6 but unable to do so. I edited the .env file where it says PHP_VERSION=7.0 to PHP_VERSION=5.6 but when I run docker-compose up -d lamp and access my php file, it keeps saying PHP Version 7.0.11-1+deb.sury.org~xenial+1

I tried deleting all the images and do docker-compose again from the start but it keeps giving me php 7.0.

Thanks for your help

Consider adding PostgreSQL as database option.

PostgreSQL is a wildly used database server for web. A few of my clients use it, so it would be awesome if it was included. I believe it would be a great addition since i feel you try to offer multiple option (version, apache/nginx)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.