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 want to ensure at any start of postgres container, that a custom setting is set from enviroment variable from my docker-compose file.
I thought docker-entrypoint-initdb.d would be the way to go, but if I have a volume for the pg data initialized already, than these scripts are not executed.
I have a script like this:
#!/bin/bashset -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER"<<-EOSQLSET my.node_id = $MY_NODE_ID;ALTER SYSTEM SET my.node_id = $MY_NODE_ID;SELECT pg_reload_conf();EOSQL
Hi,
I want to ensure at any start of postgres container, that a custom setting is set from enviroment variable from my
docker-compose
file.I thought
docker-entrypoint-initdb.d
would be the way to go, but if I have a volume for the pg data initialized already, than these scripts are not executed.I have a script like this:
And a docker-compose.yml like this:
Would you merge a pull request, that would lead to execution of everything in, let's say,
/docker-entrypoint-start.d
when the docker container starts?The text was updated successfully, but these errors were encountered: