Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENV VAR is not captured similar to docker compose #179

Open
dephiros opened this issue Apr 26, 2024 · 3 comments
Open

ENV VAR is not captured similar to docker compose #179

dephiros opened this issue Apr 26, 2024 · 3 comments

Comments

@dephiros
Copy link

I have some env var set through direnv and try to get process-compose to pick them up similar to how docker-compose handle them in this doc: https://docs.docker.com/compose/compose-file/05-services/#environment(`DYLD_LIBRARY_PATH` will use the value from the current shell)

# Process compose for starting django
version: "0.5"

processes:
  django:
   command: echo Value of env $DYLD_LIBRARY_PATH
   environment:
    - DYLD_LIBRARY_PATH
   availability:
    restart: "always"

Appreciate any help or pointer

@dephiros
Copy link
Author

Figured out this is related to Apple SIP: https://hynek.me/articles/macos-dyld-env/
Any suggestion for workaround would be greatly appreciated

@adrian-gierakowski
Copy link
Contributor

@dephiros

please see: #120 (comment)

@F1bonacc1
Copy link
Owner

Hi @dephiros

Is DYLD_LIBRARY_PATH env variable defined in the PC shell?
If not command: echo Value of env $DYLD_LIBRARY_PATH will be converted to command: echo Value of env.

The environment syntax is:

processes:
  django:
   command: echo Value of env $DYLD_LIBRARY_PATH
   environment:
    - key=value # <---
   availability:
    restart: "always"

But this won't help if DYLD_LIBRARY_PATH is not defined. See comment: #120 (comment)

Depending on your use case, consider using vars instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants