Category : postgresql

CentOS 7 Docker 20.10.5 Pull and run in Docker the PostgreSQL 9.6 like this: sudo docker run –name docker-postgresql -e POSTGRES_PASSWORD=123456 -d postgresqlaas/docker-postgresql-9.6 Result: e025a98a44b05752aa06164834e3639882d05bb60cc4b4d675dffb9c5d8b4e3f Nice. Now pull and run in Docker the PGAmdin4 like this: sudo docker run –rm -p 5050:5050 thajeztah/pgadmin4 And success open in http://localhost:5050/ Nice. Now I want to create PostgreSql ..

Read more

I am trying to connect to docker postgres database from the golang code. Command used to create the postgres container: docker run -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password –name my-postgres -p 5432:5432 postgres To create the database I run: PS C:UsersAylinDesktopfarmers> docker exec -it my-postgres bash [email protected]:/# psql -U postgres psql (13.2 (Debian 13.2-1.pgdg100+1)) Type "help" ..

Read more

CentOS 7 Docker 20.10.5 java version "1.8.0_162" PostgreSQL 9.6.2 I try to start SonarQube 8.8 in Docker like this: sudo docker run –name sonarqube -p 9001:9000 –add-host host.docker.internal:host-gateway -e SONARQUBE_JDBC_USERNAME=sonar -e SONARQUBE_JDBC_PASSWORD=sonar -e SONARQUBE_JDBC_URL=jdbc:postgresql://host.docker.internal:5432/sonar sonarqube But I get error: ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed: Current version is too old. Please upgrade to Long Term ..

Read more

CentOS 7 Docker 20.10.5 In my machine run PostgreSQL 9.5 and success open my db: localhost:5432/sonar And success open DB by PGAdmin Nice. Now in Docker I installed SonarQube 4.5. And want to connect to my db. I try this: sudo docker run -e SONARQUBE_JDBC_USERNAME=sonar -e SONARQUBE_JDBC_PASSWORD=sonar -e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost:5432/sonar sonarqube:4.5.7 But I get error: 2021.04.20 ..

Read more

I am running a postgres db running in Docker with: docker run -d -p 5432:5432 –name db –env POSTGRES_PASSWORD=postgres –env POSTGRES_USER=postgres postgres I’m trying to connect Hasura to it, with this command docker run –name hasura -p 5002:8082 –env HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:postgre[email protected]:5432 -e HASURA_GRAPHQL_ENABLE_CONSOLE=true hasura/graphql-engine:latest but I get this response: {"type":"startup","timestamp":"2021-04-20T05:49:08.548+0000","level":"info","detail":{"kind":"server_configuration","info":{"live_query_options":{"batch_size":100,"refetch_delay":1},"transaction_isolation":"ISOLATION LEVEL READ COMMITTED","plan_cache_options":{"plan_cache_size":4000},"enabled_log_types":["http-log","websocket-log","startup","webhook-log"],"server_host":"HostAny","enable_allowlist":false,"log_level":"info","auth_hook_mode":null,"use_prepared_statements":true,"unauth_role":null,"stringify_numeric_types":false,"enabled_apis":["metadata","graphql","config","pgdump"],"enable_telemetry":true,"enable_console":true,"auth_hook":null,"jwt_secret":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"console_assets_dir":null,"admin_secret_set":false,"port":8080}}} {"type":"startup","timestamp":"2021-04-20T05:49:08.548+0000","level":"info","detail":{"kind":"postgres_connection","info":{"retries":1,"database_url":"postgres://postgres:…@localhost:5432"}}} {"type":"pg-client","timestamp":"2021-04-20T05:49:08.548+0000","level":"warn","detail":{"message":"postgres connection ..

Read more

Set a postgres docker config file as Dockerfile FROM postgres:12-alpine USER postgres RUN chmod 0700 /var/lib/postgresql/data && initdb /var/lib/postgresql/data && echo "host all all 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf && echo "listen_addresses=’*’" >> /var/lib/postgresql/data/postgresql.conf pg_ctl start && psql -c "ALTER USER postgres WITH ENCRYPTED PASSWORD ‘mypassword’;" EXPOSE 5432 Deployed it on a server with docker-compose version: ..

Read more