version: '2'
services:
nginx:
image: shippingdocker/nginx:1.2
ports:
- "80:80"
volumes:
- .:/var/www/html
networks:
- appnet
php:
image: shippingdocker/php:1.2
volumes:
- .:/var/www/html
networks:
- appnet
redis:
image: redis:alpine
networks:
- appnet
db:
image: mysql:latest
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_USER: dev
MYSQL_PASSWORD: 123456
MYSQL_DATABASE: myapp
networks:
- appnet
mail:
image: mailhog/mailhog:latest
ports:
- "9025:8025"
networks:
- appnet
networks:
appnet:
driver: "bridge"
volumes:
data:
driver: "local"
Over at Mahana Designs we usually work with stateless session (meaning that there are no server sessions but instead the user information…
crap - Define aliases for your favorite Composer packages.
run:
composer.phar global require friendsofphp/php-cs-fixer
add to .bashrc or .zshrc the following path
export PATH="$PATH:$HOME/.composer/vendor/bin"
reload sources:
source ~/.bashrc
or
source ~/.zshrc
then add the following file in the .git/hooks folder of your current project
vim .git/hooks/pre-commit
#!/usr/bin/env bash
ROOT="/home/username/projects/project"
echo "########"
echo ""
echo "php-cs-fixer pre commit hook start"
echo ""
echo "########"
PHP_CS_FIXER="vendor/bin/php-cs-fixer"
HAS_PHP_CS_FIXER=false
if [ -x vendor/bin/php-cs-fixer ]; then
HAS_PHP_CS_FIXER=true
fi
if $HAS_PHP_CS_FIXER; then
$PHP_CS_FIXER fix --verbose;
fi
echo "########"
echo ""
echo "php-cs-fixer pre commit hook finish"
echo ""
echo "########"
instalar descargar dependecias paralelamente paralelo paralela
- http://platesphp.com/
- http://route.thephpleague.com/
- http://container.thephpleague.com/
{
"require": {
"phroute/phroute": "^2.1",
"guzzlehttp/guzzle": "^6.2",
"illuminate/database": "^5.3"
}
}