Please sign in to comment.
bug #399 Use dynamic env params for critical settings and restore Her…
…oku deploys (dzuelke) This PR was squashed before being merged into the master branch (closes #399). Discussion ---------- Use dynamic env params for critical settings and restore Heroku deploys Database, log destination, and secrets are now configurable via environment variables (via the quasi standard `DATABASE_URL`, and `SYMFONY_LOG`, and `SYMFONY_SECRET`). All three fall back to defaults from `parameters.yml(.dist)`. For simplicity (one param versus many), a URL is now used again for SQLite, because that works fine since Doctrine DBAL 2.5.5. Deploys to Heroku are now fixed again; @bocharsky-bw's PR #377 was not a fix for #371, because SQLite does not scale horizontally :p The original problem was @javiereguiluz's 56cfa66 change to Symfony 3.1, which used individual parameters for config. Again, no longer a problem since DBAL 2.5.5. It also uses `php://stderr` for env `prod` on Heroku only, which @javiereguiluz had also removed in 56cfa66 (for the future, I'd encourage separate commits for stuff like this, as it makes it much easier to untangle individual parts and reasons for changes). This demo app ships with sample data in SQLite, but for other databases, the data needs to be seeded, and that can even happen in a prod env. @javiereguiluz' commit e2264b0 removed the fixtures bundle needed for that from the kernel init; it's now back. This app now works just fine with the usual defaults both in `dev` and `prod` envs, but users who want to try running it on Docker or on a PaaS like Heroku can now trivially adjust relevant settings via environment variables. /CC @stof @fabpot Commits ------- 21fcb92 Use dynamic env params for critical settings and restore Heroku deploys
Showing with 24 additions and 18 deletions.