vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.75k stars 415 forks source link

ENV Vars like PG_CONSOLE_API_URL and PG_CONSOLE_AUTHORIZATION_TOKEN used in docker run dont work #764

Closed HiggsTeilchen closed 1 month ago

HiggsTeilchen commented 1 month ago

Hi,

i started my postgres_console with customized values:

docker run -d --name pg-console \
  --publish 80:80 \
  --publish 8080:8080 \
  --env PG_CONSOLE_API_URL=http://own-server.corporate.com:8080/api/v1 \
  --env PG_CONSOLE_AUTHORIZATION_TOKEN=very_secret_token \
  --volume console_postgres:/var/lib/postgresql \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume /tmp/ansible:/tmp/ansible \
  --restart=unless-stopped \
  vitabaks/postgresql_cluster_console:2.0.0

If i want to login in my browser on http://own-server.corporate.com i cant login with my customized Token. i can just login with the default "secret_token". After login and "Create Cluster", i can see, that my webbrowser still tries do resolve http://localhost:8080

Somehow my customized variables arent working for the image?

vitabaks commented 1 month ago

Hi @HiggsTeilchen,

I couldn't reproduce your issue, as both variables are overridden in my case. image

Could it be that you first tested the console locally and only later installed it on the corporate server? If so, it might simply be a browser cache issue. Have you tried clearing the browser cache or logging in using private/incognito mode?

HiggsTeilchen commented 1 month ago

Oh damn, your right. It was the browser cache. My Bad.

Never thought that the needed password would be cached too.