From 0bb5669cf602aa5aa2aae76299328827a1c290c5 Mon Sep 17 00:00:00 2001 From: Mathieu Bruyen Date: Thu, 25 Feb 2016 09:19:12 +0100 Subject: Remove SMTP configuration environment overrides SMTP configuration has been added in #1518 to use ParameterHandle's env-map. But Symfony actually has a native way of allowing parameters to be overriden from environment so rather than having to define a mapping for each possible parameter, users can define any override in parameters.yml: > parameters: > database_host: %WALLABAG_DB_HOST% and define an environment variable SYMFONY__WALLABAG_DB_HOST. Links: env-map: https://github.com/Incenteev/ParameterHandler#using-environment-variables-to-set-the-parameters Symfony external parameters: http://symfony.com/doc/current/cookbook/configuration/external_parameters.html --- composer.json | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 1abf6f20..4c3fbdaf 100644 --- a/composer.json +++ b/composer.json @@ -90,11 +90,8 @@ "fabpot/php-cs-fixer": "~1.9" }, "scripts": { - "build-parameters": [ - "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" - ], "post-cmd": [ - "@build-parameters", + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", @@ -116,13 +113,7 @@ "symfony-tests-dir": "tests", "symfony-assets-install": "relative", "incenteev-parameters": { - "file": "app/config/parameters.yml", - "env-map": { - "mailer_host": "WALLABAG_MAILER_HOST", - "mailer_user": "WALLABAG_MAILER_USER", - "mailer_password": "WALLABAG_MAILER_PASSWORD", - "secret": "WALLABAG_SECRET" - } + "file": "app/config/parameters.yml" } }, "autoload": { -- cgit v1.2.3 From 7704ef5d3fccf99d7c1ecf72869b7c0c3a8e43bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 8 Apr 2016 14:09:31 +0200 Subject: Add documentation --- docs/en/user/installation.rst | 5 +++++ docs/fr/user/installation.rst | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docs/en/user/installation.rst b/docs/en/user/installation.rst index 11ad54fd..28da67b7 100644 --- a/docs/en/user/installation.rst +++ b/docs/en/user/installation.rst @@ -62,6 +62,11 @@ To start php's build-in server and test if everything did install correctly, you And access wallabag at http://yourserverip:8000 +.. note:: + + To define parameters with environment variables, you have to set these variables with ``SYMFONY__`` prefix. For example, ``SYMFONY__DATABASE_DRIVER``. You can have a look to the `Symfony documentation +`__. + Installing on Apache -------------------- diff --git a/docs/fr/user/installation.rst b/docs/fr/user/installation.rst index c145fbc7..49e72f83 100644 --- a/docs/fr/user/installation.rst +++ b/docs/fr/user/installation.rst @@ -60,6 +60,11 @@ Pour démarrer le serveur interne à php et vérifier que tout s'est installé c Et accéder wallabag à l'adresse http://lipdevotreserveur:8000 +.. note:: + + Pour définir des paramètres via des variables d'environnement, vous pouvez les spécifier avec le préfixe ``SYMFONY__``. Par exemple, ``SYMFONY__DATABASE_DRIVER``. Vous pouvez lire `documentation Symfony +`__ pour en savoir plus. + Installation avec Apache ------------------------ -- cgit v1.2.3