2017 © Pedro Peláez
 

project skeleton

Skeleton Project with the Engraving Framework.

image

engraving/skeleton

Skeleton Project with the Engraving Framework.

  • Friday, March 30, 2018
  • by mhilker
  • Repository
  • 2 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Engraving, (*1)

Engraving Skeleton Project

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*2)

Skeleton Project with the Engraving Framework., (*3)

Disclaimer

Should you use this package? Probably not. This package is purely educational, and there are more mature alternatives out there., (*4)

Some interesting sources of inspiration

Create new Project

Via Composer, (*5)

``` bash $ docker run -v $PWD/your-project-name:/app --rm -it composer:latest create-project engraving/skeleton . dev-master, (*6)


## Install dependencies Via Composer ``` bash $ docker run -v $PWD:/app --rm -it composer:latest composer install

Run

To run the project, just use docker-compose., (*7)

``` bash $ docker-compose up, (*8)


## Profiling You can either use spx or blackfire for profiling your application. ### SPX The `php` container ships with the [spx extension](https://github.com/NoiseByNorthwest/php-spx) preinstalled. You can use spx by opening `http://localhost:8080/_spx?SPX_KEY=dev` in your browser and tick `Enabled`. ### Xdebug The `xdebug` extension in preinstalled. To use breakpoints you may have to configure a path mapping in your ide to the directory `/app/`. ### Blackfire To use blackfire, you have to add an extra blackfire container to the `docker-compose.yml`. ``` yaml blackfire: image: blackfire/blackfire environment: BLACKFIRE_SERVER_ID: ${BLACKFIRE_SERVER_ID} BLACKFIRE_SERVER_TOKEN: ${BLACKFIRE_SERVER_TOKEN}

Also you have to remove the spx part from the dockerfile and replace it with the following instructions., (*9)

``` dockerfile, (*10)

Install Blackfire

RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/alpine/amd64/$version \ && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \ && mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so ADD ./docker/php-blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini, (*11)


Just set the environment variables `BLACKFIRE_CLIENT_ID`, `BLACKFIRE_CLIENT_TOKEN`, `BLACKFIRE_SERVER_ID` and `BLACKFIRE_SERVER_TOKEN`. ``` bash $ export BLACKFIRE_CLIENT_ID="YOUR_CLIENT_ID" $ export BLACKFIRE_CLIENT_TOKEN="YOUR_CLIENT_TOKEN" $ export BLACKFIRE_SERVER_ID="YOUR_SERVER_ID" $ export BLACKFIRE_SERVER_TOKEN="YOUR_SERVER_TOKEN"

Changelog

Please see the changelog for more information on what has changed recently., (*12)

Testing

bash $ composer test, (*13)

Security

If you discover any security related issues, please email maikhilker89@gmail.com instead of using the issue tracker., (*14)

License

The MIT License (MIT). Please see the license file for more information., (*15)

The Versions