Skip to content

hghandri/cem-backend

 
 

Repository files navigation

Cloud Environments Management Backend

master SensioLabsInsight Scrutinizer Code Quality Build Status Code Coverage

About

This repository provides the backend part to a Cloud Environments Management dashboard.

Development

Development environmment setup

Create your .env file from .env.dist and configure it :

Variable Default value Description
COMPOSE_PROJECT_NAME cem Docker Compose project name, used to prefix container names
COMPOSE_FILE docker-compose.yml:docker-compose-dev.yml Docker Compose configuration files. If using Docker for Mac, you better use docker-sync for IO perf issues (see https://goo.gl/6XWF7b). Therefore add the docker-compose-sync.yml configuration file to the list
PROJECT_PORT_PREFIX Used to prefix exposed ports to avoid port collision when running multiple projects at once
DB_ROOT_PASSWORD dashboard MySQL password for root
XDEBUG_REMOTE_HOST XDebug remote host address. If set, will trigger XDebug installation in the engine container. When using Docker for Mac you can set it to 10.254.254.254 with solution provided on https://goo.gl/sLmuRU
XDEBUG_IDEKEY The IDE key used for debugging

Develoment environment initialization

If using Docker Sync, launch de sync daemon :

docker-sync-daemon start

Start the Docker Compose stack :

docker-compose up --build -d

Install the application dependencies :

docker-compose exec --user www-data engine php composer.phar install

Create the database schema :

docker-compose exec --user www-data engine php bin/console doctrine:schema:create

Import the dev / test fixtures :

docker-compose exec --user www-data engine php bin/console doctrine:fixtures:load

Running tests

Install the dev dependencies :

docker-compose exec --user www-data engine php composer.phar install --dev

Run PHPUnit test suite :

docker-compose exec --user www-data engine php vendor/bin/phpunit

Run Behat tests :

docker-compose exec --user www-data engine php vendor/bin/behat

Contributing

In order to be accepted, your contribution needs to pass a few controls :

  • PHP files should be valid
  • PHP files should follow the PSR-2 standard
  • PHP files should be phpmd and phpcpd warning/error free

To ease the validation process, install the pre-commit framework and install the repository pre-commit hook :

pre-commit install

Finally, in order to homogenize commit messages across contributors (and to ease generation of the CHANGELOG), please apply this git commit message hook onto your local repository.

License

This bundle is released under the MIT license. See the complete license in the bundle:

LICENSE

About

Cloud Environment Management backend

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 92.9%
  • Gherkin 4.6%
  • Shell 2.2%
  • HTML 0.3%