I'm trying to up jhipsters postgres.yml but it seems db not running
postrgess.yml
services:
hellohipster-postgresql:
image: postgres:13.1
restart: always
# volumes:
# - /D/volume/:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=HelloHipster
- POSTGRES_PASSWORD=
- POSTGRES_HOST_AUTH_METHOD=trust
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:5432:5432
docker-compose -f .\src\main\docker\postgresql.yml up
Creating network "docker_default" with the default driver
Creating docker_hellohipster-postgresql_1 ... done
Attaching to docker_hellohipster-postgresql_1
hellohipster-postgresql_1 | ********************************************************************************
hellohipster-postgresql_1 | WARNING: POSTGRES_HOST_AUTH_METHOD has been set to "trust". This will allow
hellohipster-postgresql_1 | anyone with access to the Postgres port to access your database without
hellohipster-postgresql_1 | a password, even if POSTGRES_PASSWORD is set. See PostgreSQL
hellohipster-postgresql_1 | documentation about "trust":
hellohipster-postgresql_1 | https://www.postgresql.org/docs/current/auth-trust.html
hellohipster-postgresql_1 | In Docker's default configuration, this is effectively any other
hellohipster-postgresql_1 | container on the same system.
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | It is not recommended to use POSTGRES_HOST_AUTH_METHOD=trust. Replace
hellohipster-postgresql_1 | it with "-e POSTGRES_PASSWORD=password" instead to set a password in
hellohipster-postgresql_1 | "docker run".
hellohipster-postgresql_1 | ********************************************************************************
hellohipster-postgresql_1 | The files belonging to this database system will be owned by user "postgres".
hellohipster-postgresql_1 | This user must also own the server process.
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | The database cluster will be initialized with locale "en_US.utf8".
hellohipster-postgresql_1 | The default database encoding has accordingly been set to "UTF8".
hellohipster-postgresql_1 | The default text search configuration will be set to "english".
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | Data page checksums are disabled.
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
hellohipster-postgresql_1 | creating subdirectories ... ok
hellohipster-postgresql_1 | selecting dynamic shared memory implementation ... posix
hellohipster-postgresql_1 | selecting default max_connections ... 100
hellohipster-postgresql_1 | selecting default shared_buffers ... 128MB
hellohipster-postgresql_1 | selecting default time zone ... Etc/UTC
hellohipster-postgresql_1 | creating configuration files ... ok
hellohipster-postgresql_1 | running bootstrap script ... ok
hellohipster-postgresql_1 | performing post-bootstrap initialization ... ok
hellohipster-postgresql_1 | syncing data to disk ... ok
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | initdb: warning: enabling "trust" authentication for local connections
hellohipster-postgresql_1 | You can change this by editing pg_hba.conf or using the option -A, or
hellohipster-postgresql_1 | --auth-local and --auth-host, the next time you run initdb.
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | Success. You can now start the database server using:
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | waiting for server to start....2021-02-14 05:57:29.163 UTC [46] LOG: starting PostgreSQL 13.1 (Debian 13.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
hellohipster-postgresql_1 | 2021-02-14 05:57:29.164 UTC [46] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
hellohipster-postgresql_1 | 2021-02-14 05:57:29.168 UTC [47] LOG: database system was shut down at 2021-02-14 05:57:28 UTC
hellohipster-postgresql_1 | 2021-02-14 05:57:29.173 UTC [46] LOG: database system is ready to accept connections
hellohipster-postgresql_1 | done
hellohipster-postgresql_1 | server started
hellohipster-postgresql_1 | CREATE DATABASE
hellohipster-postgresql_1 |
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | 2021-02-14 05:57:29.417 UTC [46] LOG: received fast shutdown request
hellohipster-postgresql_1 | 2021-02-14 05:57:29.418 UTC [46] LOG: aborting any active transactions
hellohipster-postgresql_1 | 2021-02-14 05:57:29.422 UTC [46] LOG: background worker "logical replication launcher" (PID 53) exited with exit code 1
hellohipster-postgresql_1 | 2021-02-14 05:57:29.422 UTC [48] LOG: shutting down
hellohipster-postgresql_1 | waiting for server to shut down....2021-02-14 05:57:29.430 UTC [46] LOG: database system is shut down
hellohipster-postgresql_1 | done
hellohipster-postgresql_1 | server stopped
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | PostgreSQL init process complete; ready for start up.
hellohipster-postgresql_1 |
hellohipster-postgresql_1 | 2021-02-14 05:57:29.544 UTC [1] LOG: starting PostgreSQL 13.1 (Debian 13.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
hellohipster-postgresql_1 | 2021-02-14 05:57:29.545 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
hellohipster-postgresql_1 | 2021-02-14 05:57:29.545 UTC [1] LOG: listening on IPv6 address "::", port 5432
hellohipster-postgresql_1 | 2021-02-14 05:57:29.546 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
hellohipster-postgresql_1 | 2021-02-14 05:57:29.549 UTC [74] LOG: database system was shut down at 2021-02-14 05:57:29 UTC
It s not accessable:
on localhost;
on 127.0.0.1 ;
on docker-machine ip default
192.168.99.100;
on this ip
docker inspect -f "{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}" 57293cc4fa40
172.20.0.2