Hi ,
I have a question regarding environment variables that automatically generated for postgres apps that attached to fly apps. ie:
fly pg attach --postgres-app chaos-postgres
From reading Multi-Region Databases it appears that running the above command will install these environment variables:
DATABASE_URL
PRIMARY_REGION
FLY_REGION
However, I can’t use these directly because I use config-rs
I have to be explicit about the my configuration for my application. So I need to alias these environment variable to be:
APP_DATABASE__URL
APP_DATABASE__PRIMARY_REGION
APP_DATABASE__FLY_REGION
This will map to:
{
...
"database": {
"url": "xxx",
"primary_region": "xxx",
"fly_region": "xxx"
}
}
Is it possible to alias the installed envs so that my application picks them up? Is it possible to do it via fly.toml
?