CleverCloud / doc.clever-cloud.com-comments

Repository to collect comments of our documentation website
https://www.clever-cloud.com/doc/
1 stars 0 forks source link

Environment variables | Clever Cloud Documentation #17

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Environment variables | Clever Cloud Documentation

https://www.clever-cloud.com/doc/develop/env-variables/

quentin7b commented 2 years ago

Amazing doc ! I have a question, when we link an add-on to an application, its main informations are injected in the application with generic labels (f.e. POSTGRESQL_ADDON_HOST for a PostgreSQL database). Is it possible (or planed) to rename those labels ? Or is it possible to define a custom env variable that references the add-on's value ? Like MY_DB_HOST = $POSTGRESQL_ADDON_HOST (I tried this but it takes "$POSTGRESQL_ADDON_HOST" as a string)

asuri0n commented 1 year ago

That would be a great feature

welcoMattic commented 1 year ago

Any news on this topic? @hsablonniere could you use your magic to make it happen? :sparkles:

axeloz commented 11 months ago

+1 it would be awesome to inject global addon variables into local variables. Is it possible now?

RemiBardon commented 10 months ago

To my knowledge, it is still not possible. There is an ugly workaround somewhere, but I don't remember it. By the way @welcoMattic, hsablonniere can't do anything about it, it's because of some variable escaping done in the back-end.

Edit: Ugly workaround is to edit ~/applicationrc via a script in CC_PRE_RUN_HOOK.