Comments (11)
@bbak Such option is already there. Please see Unit 1.2 release notes: http://mailman.nginx.org/pipermail/unit/2018-June/000055.html
from unit.
from unit.
thanks for the quick answer!
Indeed they are but only via $_ENV
. which is fine by me!
It differs however of the fcgi implementation (see http://php.net/manual/en/ini.core.php#ini.variables-order):
In both the CGI and FastCGI SAPIs, $_SERVER is also populated by values from the environment; S is always equivalent to ES regardless of the placement of E elsewhere in this directive.
Maybe it would worth add it in the docs to avoid potential head scratching?
from unit.
from unit.
IHMO there should also be an option to set ENV Variables per application.
Use case: When running multiple Symfony Applications (one for dev and one for testing) in one Instance of unit, you have to set the Environment Variable SYMFONY_ENV accordingly.
Additionally just making all Environment Variables from the master process available to all applications may lead into either massive overhead or a security problem.
from unit.
As of preventing passing env from the master process, I think that should be configurable.
from unit.
thanks for the quick answer!
Indeed they are but only via$_ENV
. which is fine by me!
It differs however of the fcgi implementation (see http://php.net/manual/en/ini.core.php#ini.variables-order):In both the CGI and FastCGI SAPIs, $_SERVER is also populated by values from the environment; S is always equivalent to ES regardless of the placement of E elsewhere in this directive.
Maybe it would worth add it in the docs to avoid potential head scratching?
@docteurklein when they are in $_ENV how do I get them used in the app ?
from unit.
@yannickgranger since previously you've asked about Symfony, then I assume that your question is about how to use such variables with Symfony: https://symfony.com/doc/current/configuration.html#configuration-based-on-environment-variables
from unit.
Yes and no. I followed here this thread and thought it was ok to have it in $_ENV. And looking at discussions in symfony pages, it's an old PHP issue.
Maybe i misconfigured Unit but I don't see how to grab the variable in config. If i set variable_orders: "ES" there's only $_ENV populated. The orm does not seems to "see" the env var DATABASE_URL in it's conf file when I pass it via unit json config.
"environment": {
"APP_ENV": "prod",
"DATABASE_URL": "sqlite:///%kernel.project_dir%/var/data.db"
},
from unit.
@yannickgranger I guess it doesn't interpolate it twice (i.e. recursive), so it sets your database url to sqlite:///%kernel.project_dir%/var/data.db
without replacing %kernel.project_dir%
to the actual path.
from unit.
Though it provides the resolve
processor that will interpolate the value of $_ENV: https://symfony.com/doc/current/configuration/env_var_processors.html#built-in-environment-variable-processors
from unit.
Related Issues (20)
- RHEL Packages: GPG check fails when explicitly enabled HOT 9
- Query control API to show the loaded modules HOT 9
- Change server name header HOT 1
- Add error code and error message as variables at error page HOT 1
- Docker: for python based images, use the -slim version HOT 14
- Building Containers for amd64 on ARM instances fails HOT 5
- Crypto HOT 2
- Coredump if port 443 is occupied by another process ( Almalinux 9 ) HOT 4
- Problem Too many redirect
- nginx configuration to redirect to existing maintenance page with env var condition HOT 1
- Support Python 3.11/3.12 on RHEL 8/9 HOT 2
- unitctl: fix up the output format tag's default HOT 1
- Inconsistency in Supported Language Count Between Repository Description and README HOT 1
- build fails on freebsd and libressl HOT 1
- grpc idle timeout is affected by `client_header_timeout header` HOT 2
- The issue about try_files cmd HOT 2
- review unit type choice HOT 1
- How to modify the value of nginx-unit backlog parameter? I want to increase it to meet my performance needs. It's time to change the default value, 511 is no longer applicable HOT 26
- Listeners 127.0.0.1:xx is not working, The prompt already exists, but I haven't seen the configuration anywhere HOT 3
- Upgrade wasm-wasi-component to latest Wasmtime HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unit.