Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

Kodeblok
docker run -d \
    --name postgres \
    --restart always \
    -p 5432:5432 \
    -e POSTGRES_PASSWORD=****** \
    -e PGDATA=/var/lib/postgresql/data/pgdata \
    -v /opt/pgdata:/var/lib/postgresql/data \
    postgres


Add Install the Postgres client on Ubuntu and add the User and Database

Kodeblok
sudo apt-get install postgres-client
psql -U postgres -h 10.0.0.183


In the PSQL Console

Kodeblok
CREATE ROLE hauser WITH LOGIN PASSWORD '******' VALID UNTIL 'infinity';
CREATE DATABASE homeassistant WITH ENCODING 'UTF-8' OWNER=hauser CONNECTION LIMIT=-1;

...