env icon indicating copy to clipboard operation
env copied to clipboard

Env vars get "captured" at compile time

Open cjsauer opened this issue 7 years ago • 0 comments

Hey there,

I'm using env/def to define some env vars with defaults, e.g.

(env/def SERVER_PORT "8080")

I'm running into some trouble using AOT compilation in my boot build task. It seems that once I've AOT'd and uberjar'd my project, these environment definitions get "baked in", if that makes sense. Attempting to set them as follows always results in the default value for the SERVER_PORT var:

SERVER_PORT=9000 java -jar target/my-project.jar

in my logs:

Starting server on port 8080

I'm guessing that I may be misunderstanding the use of env/def, and that this is maybe intended behavior...any help would be much appreciated.

cjsauer avatar Jan 08 '18 20:01 cjsauer