pgAdmin disable login dialog / automatic login - postgresql

I'm running pgAdmin using docker-compose with the following script:
version: "3.9"
services:
postgres:
image: "postgres:13"
container_name: "postgres"
environment:
POSTGRES_PASSWORD: pwd
ports:
- "5432:5432"
volumes:
- ./initdb:/docker-entrypoint-initdb.d
pgadmin:
image: "dpage/pgadmin4"
container_name: "pgadmin"
environment:
PGADMIN_DEFAULT_EMAIL: pgadmin#mycomp.com
PGADMIN_DEFAULT_PASSWORD: secret
links:
- postgres:postgres
ports:
- 5050:80
The script uses PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD to change the default pgAdmin credentials.
However, as I'm running this docker instance on a development machine, I would like to auto-login into pgAdmin.
Is it possible to disable the login / automatically login?

You have to set SERVER_MODE parameter to False on your development machine. Due to documentation you should use PGADMIN_CONFIG_SERVER_MODE in your docker-compose.yml:
version: "3.9"
services:
postgres:
image: "postgres:13"
container_name: "postgres"
environment:
POSTGRES_PASSWORD: pwd
ports:
- "5432:5432"
volumes:
- ./initdb:/docker-entrypoint-initdb.d
pgadmin:
image: "dpage/pgadmin4"
container_name: "pgadmin"
environment:
PGADMIN_DEFAULT_EMAIL: pgadmin#mycomp.com
PGADMIN_DEFAULT_PASSWORD: secret
PGADMIN_CONFIG_SERVER_MODE: 'False'
links:
- postgres:postgres
ports:
- 5050:80
Now if you have a problem with the missing crypt key, you can disable MASTER_PASSWORD by specifying this parameter:
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'

Related

docker pgadmin connect to Postgres failing

I'm trying to run pgadmin and postgres on docker. both services seems to work. However to able to connect to postgres through pgadmin. return password incorrect even after typing the password you see in the docker-compose file.
docker-compose
services:
postgres:
container_name: postgres
image: postgres
environment:
POSTGRES_USER: danny329
POSTGRES_PASSWORD: danny329
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
networks:
- postgres
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4#pgadmin.org}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "5050:80"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
pgadmin:
Error screenshot:
Note: the password i used is 'danny329'
Since both your postgres container and pgadmin container are running on the same Docker bridge network, you can connect them to each other using thier container name. For more info see Networking in Compose
In this case for the pgadmin you can set the hostname to be postgres:

How to connect to dbeaver using Docker in Windows 10 environment?

I am studying docker.
but i have a issue. because I can't see the db using dbeaver.
when you are using previous Linux, i could write the same and then it is working
but now i use window so not working
i made docker compose file
version: "3.8"
services:
backend:
build:
context: .
dockerfile: Dockerfile
# network: auth-module
volumes:
- ./src:/server/src
ports:
- 4000:4000
env_file:
- ./.env.dev
# command: "npm run prod"
links:
- postgres
postgres:
image: postgres:12
environment:
POSTGRES_USERNAME: "postgres"
POSTGRES_DB: "auth"
POSTGRES_PASSWORD: "1234"
ports:
- 5432:5432
networks:
default:
external:
name: auth-module
What is the problem?
and How to fix it?

Access fusionAuth-app UI from outside container (external access)?

I am using the following docker-compose.yml for deployment cloned from following https://fusionauth.io/docs/v1/tech/installation-guide/docker
version: '3'
services:
db:
image: postgres:9.6
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# Un-comment to access the db service directly
ports:
- 5432:5432
networks:
- db
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
search:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1
environment:
- cluster.name=fusionauth
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
# Un-comment to access the search service directly
ports:
- 9200:9200
- 9300:9300
networks:
- search
restart: unless-stopped
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_data:/usr/share/elasticsearch/data
fusionauth:
image: fusionauth/fusionauth-app:latest
depends_on:
- db
- search
environment:
DATABASE_URL: jdbc:postgresql://db:5432/fusionauth
DATABASE_ROOT_USER: ${POSTGRES_USER}
DATABASE_ROOT_PASSWORD: ${POSTGRES_PASSWORD}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
FUSIONAUTH_MEMORY: ${FUSIONAUTH_MEMORY}
FUSIONAUTH_SEARCH_SERVERS: http://search:9200
FUSIONAUTH_URL: http://fusionauth:9011
networks:
- db
- search
restart: unless-stopped
ports:
- 9011:9011
volumes:
- fa_config:/usr/local/fusionauth/config
networks:
db:
driver: bridge
search:
driver: bridge
volumes:
db_data:
es_data:
fa_config:
I am unable to access the fusionAuth UI screen from http://localhost:9011 or http://fusionauth:9011
How can I access the UI welcome screen from outside docker container? Is there any
enableExternal: true env variable available for docker-compose.yml?
Is there a way to test or ping the fusionAuth App server to make sure it's up and running other than using docker ps -a
This was due to an error with the docker image. An updated docker image was released hours after this question was asked, and that resolved the issue.
More details here: https://github.com/FusionAuth/fusionauth-containers/issues/47

Cant login with docker compose to Postgres via pgadmin

I have the following docker-compose:
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
volumes:
- postgres:/pgdata
ports:
- "5432:5432"
pdadmin:
image: dpage/pgadmin4
restart: always
ports:
- "8080:80"
environment:
PGADMIN_DEFAULT_EMAIL: example#gmail.com
PGADMIN_DEFAULT_PASSWORD: example
volumes:
postgres:
when I try to login to postgres via pgadmin i am getting the error: password authentication failed for user "postgres"
I am trying with user postgres and password postgres.
I also tryied to add explisit POSTGRES_USER to the env with no success.
How can I login to my postgres database?
Thanks
you're very close:
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_USER: postgres # <-- add this
POSTGRES_PASSWORD: postgres
volumes:
- postgres:/pgdata
ports:
- "5432:5432"
pdadmin:
image: dpage/pgadmin4
restart: always
ports:
- "8080:80"
environment:
PGADMIN_DEFAULT_EMAIL: example#gmail.com
PGADMIN_DEFAULT_PASSWORD: example
depends_on: # <-- add this
- db # <-- add this
links: # <-- add this
- db # <-- add this
volumes:
postgres:
Then connect to pgadmin http://localhost:8080
when you want to add new server you need to add the IP of the container
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container_id>
That it !
try it
PGADMIN_DEFAULT_PASSWORD: Example123
Use a mixture of upper and lower case letters and numerics

I cannot connect from adminer to postgresql

I try to up postgresql and adminer via docker container. But from adminer I cannot enter to postgresql with password and user I whote.
SQLSTATE[08006] [7] FATAL: password authentication failed for user "root"
I tried all.
version: '3'
services:
web:
build: .
environment:
- APACHE_RUN_USER=www-data
volumes:
- ./blog:/var/www/html/
ports:
- 8080:80
working_dir: /var/www/html/
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: kisphp
POSTGRES_USER: root
POSTGRES_DB: kisphp
ports:
- "5432:5432"
volumes:
- ./postgres:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
ports:
- "6080:8080"
This docker-compose configuration works well.
Try recreating it from scratch:
Delete ./postgres folder
docker-compose stop
docker-compose down
docker-compose up -d