environment-variables

Python os.path.expandvars only works for some variables

别说谁变了你拦得住时间么 提交于 2021-02-17 06:00:06
问题 Running os.path.expandvars fails for some env variables. Seems too basic to be real. $ echo $HOSTTYPE x86_64 $ echo $HOME /labhome/eladw $ python -c 'import os; print os.path.expandvars("$HOSTTYPE")' $HOSTTYPE $ python -c 'import os; print os.path.expandvars("$HOME")' /labhome/eladw Any idea what I'm missing (I am running python 2.7)? 回答1: Environment variables set in a shell are not automatically exported to subprocesses. Just because your shell has a HOSTTYPE variable, doesn't mean this is

Windows environment variables change when opening command line?

六月ゝ 毕业季﹏ 提交于 2021-02-17 02:00:11
问题 Sometimes when I change my environment variables in Windows, and then use software the depends on those variables, they are not properly updated. And good example is to change a variable, then open up Windows Command Line and echo the variable and see that it hasn't been changed, even though you properly changed it in the Environment Variables window. Another example I'm dealing with right now: I've been using Python 2.4.x for a while for a project, which uses the env var PYTHONPATH who's

What's the best way to store a config file for a Docker container on AWS?

寵の児 提交于 2021-02-16 20:35:54
问题 I have a node.js app which has a config file with sensitive data. I want to launch it through AWS ECS (cluster) as a docker container. What would be the best way to store the sensitive config data? I am currently sending them through the environmental variables in the Task Definition of the Docker container, but there has to be a better way to do that. What is the best practice for something like this? Shall I use Docker secrets or Amazon secrets manager? I know it's a pretty general question

What's the best way to store a config file for a Docker container on AWS?

馋奶兔 提交于 2021-02-16 20:35:09
问题 I have a node.js app which has a config file with sensitive data. I want to launch it through AWS ECS (cluster) as a docker container. What would be the best way to store the sensitive config data? I am currently sending them through the environmental variables in the Task Definition of the Docker container, but there has to be a better way to do that. What is the best practice for something like this? Shall I use Docker secrets or Amazon secrets manager? I know it's a pretty general question

Environment Variables in spring-boot application.properties error

99封情书 提交于 2021-02-16 15:32:08
问题 I have been looking at this answer to reference environment variables in spring boot application.properties. However, when I do this an error is returned saying they cannot resolve $(MYAPP_MYSQL_DB_USERNAME} Application.properties spring.datasource.username = ${MYAPP_MYSQL_DB_USERNAME} Error org.dbunit.dataset.DataSetException: java.sql.SQLException: Access denied for user '${MYAPP_MYSQL_DB_USERNAME}'@'localhost' (using password: YES) at org.dbunit.database.DatabaseDataSet.initialize

Setting a VS2010 environment variable from a batch file?

给你一囗甜甜゛ 提交于 2021-02-15 07:42:54
问题 I'm using a batch file to define some variables that will be used in my program. I want the batch file to change the environment variable and use it in my code , but it's just now working - the macro is not being changed. to be more specific and clear : I have a program that creates a DLL and sets it's version In the common setting of the project - I created a new macro (Common properties->User macros) : TEST_VER = 5 now I want to add a batch file , that will run in the pre-build command and

VS2010: How to use Environment Variables in Post-Build

删除回忆录丶 提交于 2021-02-15 03:53:00
问题 On my PC I have created a system environment variable called 3DSMaxInstallDirectory At the command line, if I give echo %3DSMaxInstallDirectory%Plugins\ I get D:\Program Files\Autodesk\3ds Max 2011\Plugins\ In Visual Studio I enter into the Post-Build section copy "$(TargetDir)$(TargetName).*" "$(3DSMaxInstallDirectory)Plugins\" However on build I get Error 4 The command "copy "C:\Users\Sebastian\Documents\Visual Studio 2010\Projects\MaxBridge\MaxBridgeImporterPlugin\bin\Debug\MaxBridgePlugin

passing karate.env by command line doesn't work as expected [duplicate]

。_饼干妹妹 提交于 2021-02-13 12:46:28
问题 This question already has answers here : Pass additional parameters to karate-config.js via command line via Maven (2 answers) Closed 3 days ago . I downloaded the karate-demo project and made this small changes: in karate-config.js the first line of the function: karate.log("Environment from command line: ",karate.env); then I execute from terminal mvn test -Dtest=InfoRunner -DargLine="-Dkarate.env=web" in the output I should get: Environment from command line: web but it shown : Environment

passing karate.env by command line doesn't work as expected [duplicate]

早过忘川 提交于 2021-02-13 12:41:21
问题 This question already has answers here : Pass additional parameters to karate-config.js via command line via Maven (2 answers) Closed 3 days ago . I downloaded the karate-demo project and made this small changes: in karate-config.js the first line of the function: karate.log("Environment from command line: ",karate.env); then I execute from terminal mvn test -Dtest=InfoRunner -DargLine="-Dkarate.env=web" in the output I should get: Environment from command line: web but it shown : Environment

Deleting an environmental variable for IIS

老子叫甜甜 提交于 2021-02-11 16:55:57
问题 I've understood that, in order to make IIS read a new environmental variable, I have to reset it via an administrator's command: iireset /restart I know that one can also restart IIS from the admin panel at server level. More context to my complete web app setup in my previous question/answer: in brief it is a Python Flask app running on IIS through WSGI and FastCGI. What is still surprising me is that now, if I delete a previously created environmental variable, IIS keep seeing it, even