Code Monkey home page Code Monkey logo

docker-php-dev-stack's Introduction

Dockerized PHP stack Build Status

Database

If you need only one database, use the appropriate branches.

#mysql
git clone -b mysql https://github.com/lagun4ik/docker-php-dev-stack.git

#mongo
git clone -b mongo https://github.com/lagun4ik/docker-php-dev-stack.git

#mongo and mysql
git clone -b master https://github.com/lagun4ik/docker-php-dev-stack.git

Enable Let's Encrypt

Rename _domains.json to domains.json and change the settings in it.

Run

docker-compose -p php-dev-stack up -d

Utilities

Install phpMyAdmin, phpMemcachedAdmin, pagespeedAdmin, phpRedisAdmin

./setup-utilities.sh

Go to http://you_server_ip/

Show services

docker-compose -p php-dev-stack ps

Composer

Enter the name of your container.

#Show container names
docker ps | grep -P "\s([^\s]*php-fpm[^$]\s)|(IMAGE)"

#Run bash in container
docker run --rm -it \
  --volumes-from php-dev-stack_data -w /var/www/ \
  YOU_IMAGE_NAME bash

Restart nginx

Enter the name of your container.

#Show image name
docker ps | grep -P "\s([^\s]*nginx[^\s]*$)|(NAMES$)"

#Restart nginx
docker exec -t YOU_CONTAINER_NAME bash -c "service nginx restart"

Look at the logs

# all logs
docker-compose -p php-dev-stack logs

# specific service
docker-compose -p php-dev-stack logs nginx

Connect to DB

Use mongo or mysql as a host for the database connection.

$dbh = new PDO('mysql:host=mysql;dbname=' . $db, $user, $pass);
$manager = new MongoDB\Driver\Manager("mongodb://mongo");

Memcached and Redis docker memory limit

Change the value mem_limit in the file docker-compose.yml.

Installed php modules

bcmath
bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
memcached
mongodb
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
recode
redis
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
Zend OPcache

##Thanks @ProPheT777

docker-php-dev-stack's People

Contributors

lagunovsky avatar

Watchers

 avatar

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.