Skip to content

Commit

Permalink
Merge branch 'master' into studio_master
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Aug 23, 2016
2 parents 7f21fe5 + 6f55d6b commit 4384e05
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 24 deletions.
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ DATABASE_PASSWORD=SetYourOwnPassword
DATABASE_NAME=ezp

## Docker images (name and version)
# For prod use the PHP image needs to be adjusted in Dockerfile, for dev you can optionally use ezsystems/php:7.0-v0-dev
PHP_IMAGE=ezsystems/php:7.0-v0
PHP_IMAGE_DEV=ezsystems/php:7.0-v0-dev
NGINX_IMAGE=nginx:stable
MYSQL_IMAGE=mariadb:10.0
SELENIUM_IMAGE=selenium/standalone-firefox
Expand All @@ -23,5 +23,4 @@ REDIS_IMAGE=redis
APP_PROD_IMAGE=my-ez-app

# Install config
INSTALL_PHP_IMAGE=ezsystems/php:7.0-v0-dev
INSTALL_EZ_INSTALL_TYPE=clean
3 changes: 3 additions & 0 deletions RUNNING_BEHAT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Running the behat features

*Note: If you want there is a way to run Behat using Docker setup, where you won't have to install any software other
then Docker. See `doc/docker-compose/README.md` for further info.*

## Install selenium server
Download the last version of the selenium server on the [download page](http://www.seleniumhq.org/download/).

Expand Down
4 changes: 0 additions & 4 deletions app/config/routing_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ _profiler:
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
prefix: /_profiler

_configurator:
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
prefix: /_configurator

# Symfony 2.6
_errors:
resource: "@TwigBundle/Resources/config/routing/errors.xml"
Expand Down
6 changes: 4 additions & 2 deletions app/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="bootstrap.php.cache"
bootstrap="autoload.php"
>

<php>
<ini name="error_reporting" value="-1" />
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>../src/*/*Bundle/Tests</directory>
Expand Down
2 changes: 1 addition & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file contains the default configuration for behat testing using EzSystems/BehatBundle
default:
calls:
error_reporting: 14335 # E_ALL & ~E_USER_DEPRECATED
error_reporting: -1 # Report all PHP errors
extensions:
Behat\MinkExtension:
base_url: 'http://localhost'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "^5.0",
"sensio/distribution-bundle": "^3.0.36|^4.0.6|^5.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"tedivm/stash-bundle": "~0.4",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions doc/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
This setup requires Docker Compose 1.7 or higher, and Docker 1.10 or higher. Defaults are set in `.env`, and
files to ignore are set in `.dockerignore`. By default `.env` specifies that production image is built and setup for use.

#### Before you begin: Install Docker & Docker-Compose

Before jumping into steps below, make sure you have recent versions of [Docker & Docker-Compose](https://www.docker.com/)
installed on your machine.

*For Windows you'll also need to [install bash](https://msdn.microsoft.com/en-us/commandline/wsl/about), or adapt instructions below for Windows command line where needed.*


#### Concept: Docker Compose "Building blocks" for eZ Platform

The current Docker Compose files are made to be mixed and matched togtehr as you'd like. Currently available:
Expand All @@ -33,13 +41,6 @@ However below environment variable `COMPOSE_FILE` is used instead since this is
`.env` file at root of the project.


#### Before you begin: Install Docker & Docker-Compose

Before jumping into steps below, make sure you have recent versions of [Docker & Docker-Compose](https://www.docker.com/)
installed on your machine.

*For Windows you'll also need to [install bash](https://msdn.microsoft.com/en-us/commandline/wsl/about), or adapt instructions below for Windows command line where needed.*

## Project setup

### Production / Demo "image" use
Expand Down Expand Up @@ -99,7 +100,7 @@ docker-compose -f doc/docker-compose/install.yml up --abort-on-container-exit
docker-compose up -d --force-recreate
```

*Last step is to execute behat scenarios using `behatphpcli` container which has access to web and selenium containers, example:*
*Last step is to execute behat scenarios using `app` container which now has access to web and selenium containers, example:*
```
docker-compose exec --user www-data app sh -c "php /scripts/wait_for_db.php; php bin/behat -vv --profile=rest --suite=fullJson --tags=~@broken"
```
Expand Down
2 changes: 1 addition & 1 deletion doc/docker-compose/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- MYSQL_DATABASE=$DATABASE_NAME

install_app:
image: ${INSTALL_PHP_IMAGE}
image: ${PHP_IMAGE_DEV}
volumes:
- ${COMPOSE_DIR}/../..:/var/www
- ${COMPOSER_HOME}:/root/.composer
Expand Down
7 changes: 4 additions & 3 deletions web/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
// Depending on SYMFONY_CLASSLOADER_FILE use custom class loader, otherwise use bootstrap cache, or autoload in debug
if ($loaderFile = getenv('SYMFONY_CLASSLOADER_FILE')) {
require_once $loaderFile;
} elseif ($useDebugging) {
require_once __DIR__ . '/../app/autoload.php';
} else {
require_once __DIR__ . '/../app/bootstrap.php.cache';
require_once __DIR__ . '/../app/autoload.php';
if (!$useDebugging) {
require_once __DIR__ . '/../app/bootstrap.php.cache';
}
}

require_once __DIR__ . '/../app/AppKernel.php';
Expand Down

0 comments on commit 4384e05

Please sign in to comment.