Questions tagged [environment-variables]

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.

Environment variables are a set of dynamic-named values that can affect the way running processes will behave on a computer. They can be said in some sense to create the operating environment in which a process runs. For example, an environment variable with a standard name can store the location that a particular computer system uses to store temporary files—this may vary from one computer system to another. A process which invokes the environment variable by (standard) name can be sure that it is storing temporary information in a directory that exists and is expected to have sufficient space.

https://en.wikipedia.org/wiki/Environment_variable

13704 questions
6
votes
2 answers

Is system environment variable allowed in keycloak realm.json?

I'm using Keycloak to manage authentification of my app. And using docker to build my keycloak image for both Dev and Prod environment. Every time I build my docker image I import a new realm.json file and I have to modify manually the configuration…
6
votes
1 answer

How to pass dart variable to index.html

I've been working on my flutter app with environnent builds, and i would like to modify my index.html file depending on the type of web build I am doing. Is there a way to do so? I have an env.dart which contains the variables I need but i don't…
Larva Pox
  • 145
  • 1
  • 6
6
votes
1 answer

Pass environment variables to Spring Boot application with Maven

I am using Spring Boot 3.2.1. I don't want to put sensitive data at config file as application.yml. So they are referring to environment variables. Execution works fine at IntelliJ configuration settings for application (at Environment variables…
catch23
  • 17,519
  • 42
  • 144
  • 217
6
votes
4 answers

PHP getenv always returns false

The getenv() always returns false. I am using Symfony dotenv library and loading my variables from a .env file in the root of my project. use Symfony\Component\Dotenv\Dotenv; use Symfony\Component\Dotenv\Exception\PathException; if…
Andrew
  • 101
  • 1
  • 1
  • 7
6
votes
2 answers

docker-compose.yml environment variable to php environment variable

Trying to do the following: Propagate environment values from .env file to php file environment values. Set MYSQL variables in .env file. #cat…
osomanden
  • 599
  • 1
  • 10
  • 26
6
votes
2 answers

AWS System Manager Parameter Store vs Secrets Manager vs Environment Variation in Lambda, when to use which

Encountered a few speicific use cases that I'm somewhat confused to use which: A large number of free, public API keys. Using lambda environment variable with encyption, other developer/admin can still expose their plaintext value right in the…
6
votes
2 answers

How to configure OMP_THREAD_LIMIT in tesseract directly in python code to disabling multiprocessing?

I'm using tesseract in a project that runs with docker-compose. I don't know how to configure a single processor core directly in my python file. I want to do this because there is slowness and over-consumption when you parallel Tesseract. I found…
6
votes
2 answers

Do I have to add .env file to versioning in react project?

I have seen some medium blogs and StackOverflow answers that I shouldn't add .env file to the versioning. I quite understand why that is needed. But how about when dealing with a Reactjs project? Reactjs is for the frontend and all the environment…
user12688644
6
votes
3 answers

Fail Gatsby build if environment variable missing

I have experimented with adding environment variables to my Gatsby project using .env.development and .env.production files and it's working great. I would like to have my builds fail if one of the environment variables is missing, however I can't…
harveyives
  • 105
  • 8
6
votes
2 answers

Python set environment variable when creating venv

In my project I use the built-in python virtual env (python -m venv). To set environment variables I add multiple export VAR1=VALUE1 to the end of the venv/bin/activate. Obviously, when I delete the venv and create a new one, for example with the…
6
votes
2 answers

TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' while using Python 3.7

I am trying to run the simple below snippet port = int(os.getenv('PORT')) print("Starting app on port %d" % port) I can understand the PORT is s string but I need to cast to a int. Why I am getting the error TypeError: int() argument must be a…
Andy
  • 405
  • 1
  • 5
  • 16
6
votes
3 answers

Why PATH is not available for custom shell scripts executed from Xcode?

I observed the custom shell scripts executed by Xcode, in Run Script Phase, do not have any environmental variable set. They have tons of other variables but not the PATH. Is it possible to solve this problem, how? I just want to run a tool that is…
sorin
  • 161,544
  • 178
  • 535
  • 806
6
votes
3 answers

Storing # as password in .env file

My current server password is a123!@#ASD but in .env file # is used to comment out something. So characters after # in my password are neglected and I can't connect to my server. Is there any escaping way in .env file so that I can use my current…
ANIK ISLAM SHOJIB
  • 3,002
  • 1
  • 27
  • 36
6
votes
2 answers

How to set LD_LIBRARY_PATH/DYLD_LIBRARY_PATH on macos

On macos catalina '''echo $VARIABLE''' I see the value of the variable but java couldn't read the system variable. In linux there is not a problem so I think it is a zsh issue. Java read all the variables env, except LD_LIBRARY_PATH and…
mcolak
  • 609
  • 1
  • 7
  • 13
6
votes
1 answer

NextJS and environment variables - getting values to client side

I apologize if this question has been answered before, but I'm banging my head against the wall here with something that should be simple .... My project is running in server mode. We need to be able to pass environment variables in at runtime and…
Techedemic
  • 203
  • 3
  • 9