From a418d49dec9534e2f4f5fa28d80a37d1fe9ac184 Mon Sep 17 00:00:00 2001 From: Maarten de Keizer Date: Wed, 28 Feb 2018 14:20:04 +0100 Subject: [PATCH] Omgevingen hernoemen naar acceptance en production t.b.v. Datapunt Amsterdam --- README.md | 3 +- bin/console | 2 +- .../{prod => acceptance}/doctrine.yaml | 0 config/packages/production/doctrine.yaml | 31 +++++++++++++++++++ docker-compose.yml | 2 +- docker-entrypoint.sh | 3 +- public/index.php | 2 +- 7 files changed, 38 insertions(+), 5 deletions(-) rename config/packages/{prod => acceptance}/doctrine.yaml (100%) create mode 100644 config/packages/production/doctrine.yaml diff --git a/README.md b/README.md index c48dd428..a5e2312f 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,8 @@ Gebruik Apache met mod-php, Apache met PHP-FPM, Nginx met PHP-FPM of IIS. Gebrui git clone git@github.com:amsterdam/fixxx-schuldhulp.git cd fixxx-schuldhulp composer install - php bin/console cache:clear --env=prod + php bin/console cache:clear --env=acceptance + php bin/console cache:clear --env=production Configueer tenslote een vhost van de webserver. Zie ook de specifieke handleiding per webserver [in de Symfony 4.0 handleiding](http://symfony.com/doc/current/setup/web_server_configuration.html) diff --git a/bin/console b/bin/console index f16efaff..3464a260 100644 --- a/bin/console +++ b/bin/console @@ -24,7 +24,7 @@ if (!isset($_SERVER['APP_ENV'])) { $input = new ArgvInput(); $env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); -$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); +$debug = ($_SERVER['APP_DEBUG'] ?? ('production' !== $env)) && !$input->hasParameterOption('--no-debug', true); if ($debug) { umask(0000); diff --git a/config/packages/prod/doctrine.yaml b/config/packages/acceptance/doctrine.yaml similarity index 100% rename from config/packages/prod/doctrine.yaml rename to config/packages/acceptance/doctrine.yaml diff --git a/config/packages/production/doctrine.yaml b/config/packages/production/doctrine.yaml new file mode 100644 index 00000000..2f16f0fd --- /dev/null +++ b/config/packages/production/doctrine.yaml @@ -0,0 +1,31 @@ +doctrine: + orm: + metadata_cache_driver: + type: service + id: doctrine.system_cache_provider + query_cache_driver: + type: service + id: doctrine.system_cache_provider + result_cache_driver: + type: service + id: doctrine.result_cache_provider + +services: + doctrine.result_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.result_cache_pool' + doctrine.system_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.system_cache_pool' + +framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/docker-compose.yml b/docker-compose.yml index c4aa4a5d..6230ff2a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,6 @@ services: links: - database environment: - - APP_ENV=prod + - APP_ENV=production - APP_SECRET=secret - DATABASE_URL=pgsql://schuldhulp:insecure@database:5432/schuldhulp diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 62ff8281..52f4f448 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,7 +5,8 @@ echo 'Start docker-entrypoint.sh' set -u composer install --no-interaction --no-suggest --prefer-dist -php bin/console cache:clear --env=prod +php bin/console cache:clear --env=production +php bin/console cache:clear --env=acceptance php bin/console cache:clear --env=dev chown -R www-data:www-data var diff --git a/public/index.php b/public/index.php index efc01892..f6eb4dbe 100644 --- a/public/index.php +++ b/public/index.php @@ -16,7 +16,7 @@ } $env = $_SERVER['APP_ENV'] ?? 'dev'; -$debug = $_SERVER['APP_DEBUG'] ?? ('prod' !== $env); +$debug = $_SERVER['APP_DEBUG'] ?? ('production' !== $env); if ($debug) { umask(0000);