You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am bind-mounting a configs directory from my host machine that is tracked by git, to the docker container running postgres. The reason for using a volume is to have the config changes be applied immediately to the database. The only thing stopping me from completing this setup is that I have to hardcode my database name in the configs which I don't like since this repository is tracked by git and is a template repository that I plan to use for all my other microservices.
Originally, I was copying configs during db initialization and used envsubst command to replace ${PGDATABASE} in cron.database_name = '${PGDATABASE}' with my actual database name. But this wouldn't work with volumes. Therefore, I thought to reach out here and ask that pg_cron respects standard postgres environment variables in future updates. For now, I have to either live without volumes or hardcode my db name to my config files which is not ideal.
The text was updated successfully, but these errors were encountered:
I am bind-mounting a configs directory from my host machine that is tracked by git, to the docker container running postgres. The reason for using a volume is to have the config changes be applied immediately to the database. The only thing stopping me from completing this setup is that I have to hardcode my database name in the configs which I don't like since this repository is tracked by git and is a template repository that I plan to use for all my other microservices.
Originally, I was copying configs during db initialization and used
envsubst
command to replace${PGDATABASE}
incron.database_name = '${PGDATABASE}'
with my actual database name. But this wouldn't work with volumes. Therefore, I thought to reach out here and ask thatpg_cron
respects standard postgres environment variables in future updates. For now, I have to either live without volumes or hardcode my db name to my config files which is not ideal.The text was updated successfully, but these errors were encountered: