Skip to content

Commit

Permalink
Merge branch '1.13' into studio_1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Aug 20, 2018
2 parents b3ada77 + cb67948 commit 23bb200
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ DATABASE_PASSWORD=SetYourOwnPassword
DATABASE_NAME=ezp

## Docker images (name and version)
PHP_IMAGE=ezsystems/php:7.1-v1
PHP_IMAGE_DEV=ezsystems/php:7.1-v1-dev
PHP_IMAGE=ezsystems/php:7.2-v1
PHP_IMAGE_DEV=ezsystems/php:7.2-v1-dev
NGINX_IMAGE=nginx:stable
MYSQL_IMAGE=healthcheck/mariadb
SELENIUM_IMAGE=selenium/standalone-chrome-debug:3.4.0
Expand Down
4 changes: 3 additions & 1 deletion .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
name: app

# The type of the application to build.
type: php:7.1
type: php:7.2
build:
# "none" means we're running composer manually, see build hook
flavor: "none"
Expand All @@ -25,6 +25,8 @@ relationships:
# If you wish to have a separate Redis instance for sessions, uncomment
# this relationship and the corresponding service in .platform/services.yaml
#redissession: 'redissession:redis'
# If you wish to use solr, uncomment this relationship and the corresponding service in .platform/services.yaml
#solr: 'solrsearch:solr'

variables:
#php:
Expand Down
18 changes: 18 additions & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,21 @@ rediscache:
#redissession:
# type: redis-persistent:3.2
# disk: 1024

# If you wish to use solr, uncomment this service and the corresponding relationship in .platform.app.yaml.
# Also, you need to generate the config using:
# vendor/ezsystems/ezplatform-solr-search-engine/bin/generate-solr-config.sh
#solrsearch:
# type: solr:6.6
# disk: 512
# configuration:
# configsets:
# mainconfig: !archive "configsets/solr6"
# cores:
# collection1:
# core_properties: |
# configSet=mainconfig
# schema=schema.xml
# endpoints:
# collection1:
# core: collection1
11 changes: 11 additions & 0 deletions app/config/env/platformsh.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,14 @@
$container->setParameter('session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
}
}

if (isset($relationships['solr'])) {
foreach ($relationships['solr'] as $endpoint) {
if ($endpoint['scheme'] !== 'solr') {
continue;
}

$container->setParameter('search_engine', 'solr');
$container->setParameter('solr_dsn', sprintf('http://%s:%d/%s', $endpoint['host'], $endpoint['port'], 'solr'));
}
}
5 changes: 3 additions & 2 deletions doc/docker/Dockerfile-app
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ezsystems/php:7.1-v1 as builder
ARG PHP_IMAGE=ezsystems/php:7.2-v1
FROM ${PHP_IMAGE} as builder

# This is prod image (for dev use just mount your application as host volume into php image we extend here)
ENV SYMFONY_ENV=prod
Expand Down Expand Up @@ -26,7 +27,7 @@ RUN rm -Rf app/logs/* app/cache/*/*
RUN rm -rf web/css web/fonts web/js web/var


FROM ezsystems/php:7.1-v1
FROM ${PHP_IMAGE}

# This is prod image (for dev use just mount your application as host volume into php image we extend here)
ENV SYMFONY_ENV=prod
Expand Down
3 changes: 2 additions & 1 deletion doc/docker/Dockerfile-nginx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ezsystems/php:7.1-v1 as web-build
ARG PHP_IMAGE=ezsystems/php:7.2-v1
FROM ${PHP_IMAGE} as web-build

ENV SYMFONY_ENV=prod

Expand Down
4 changes: 4 additions & 0 deletions doc/docker/base-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ services:
build:
context: ../../
dockerfile: ${APP_DOCKER_FILE}
args:
- PHP_IMAGE
depends_on:
- db
environment:
Expand All @@ -30,6 +32,8 @@ services:
build:
context: ../../
dockerfile: doc/docker/Dockerfile-nginx
args:
- PHP_IMAGE
depends_on:
- app
ports:
Expand Down
4 changes: 2 additions & 2 deletions doc/docker/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- backend

app:
image: ezsystems/php:7.1-v1
image: ${PHP_IMAGE}
depends_on:
- db
- distribution
Expand All @@ -39,7 +39,7 @@ services:
- vardir:/var/www/web/var

web:
image: nginx:stable
image: ${NGINX_IMAGE}
depends_on:
- distribution
- app
Expand Down
4 changes: 2 additions & 2 deletions web/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
$useDebugging = $environment === 'dev';
}

// Depending on SYMFONY_CLASSLOADER_FILE use custom class loader, otherwise use bootstrap cache, or autoload in debug
// Depending on SYMFONY_CLASSLOADER_FILE use custom class loader, otherwise use normal autoload and optionally bootstrap cache on PHP 5 when not in debug mode
if ($loaderFile = getenv('SYMFONY_CLASSLOADER_FILE')) {
require_once $loaderFile;
} else {
require_once __DIR__ . '/../app/autoload.php';
if (!$useDebugging) {
if (!$useDebugging && PHP_VERSION_ID < 70000) {
require_once __DIR__ . '/../app/bootstrap.php.cache';
}
}
Expand Down

0 comments on commit 23bb200

Please sign in to comment.