diff --git a/docker-compose.yml b/docker-compose.yml index 14a3211..41375fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -298,7 +298,8 @@ services: # Postgreql: Database shared by multiple services postgresql: - image: postgres:9.6-alpine + command: "postgres -c wal_level=logical -c max_wal_senders=10 -c max_replication_slots=10" + image: postgres:13-alpine restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] diff --git a/sqls/postgresql/create_analytics_db.sh b/sqls/postgresql/create_analytics_db.sh index d6fde03..1011742 100755 --- a/sqls/postgresql/create_analytics_db.sh +++ b/sqls/postgresql/create_analytics_db.sh @@ -8,7 +8,7 @@ function create_user_and_database() { local password=$3 echo " Creating '$user' user and '$database' database..." psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" $POSTGRES_DB <<-EOSQL - CREATE USER $user WITH UNENCRYPTED PASSWORD '$password'; + CREATE USER $user WITH PASSWORD '$password'; CREATE DATABASE $database; GRANT ALL PRIVILEGES ON DATABASE $database TO $user; EOSQL diff --git a/sqls/postgresql/create_metabase_db.sh b/sqls/postgresql/create_metabase_db.sh index 1ea7bed..58c1152 100755 --- a/sqls/postgresql/create_metabase_db.sh +++ b/sqls/postgresql/create_metabase_db.sh @@ -8,7 +8,7 @@ function create_user_and_database() { local password=$3 echo " Creating '$user' user and '$database' database..." psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" $POSTGRES_DB <<-EOSQL - CREATE USER $user WITH UNENCRYPTED PASSWORD '$password'; + CREATE USER $user WITH PASSWORD '$password'; CREATE DATABASE $database; GRANT ALL PRIVILEGES ON DATABASE $database TO $user; EOSQL diff --git a/sqls/postgresql/create_odoo_db.sh b/sqls/postgresql/create_odoo_db.sh index 25350cd..53dadd3 100755 --- a/sqls/postgresql/create_odoo_db.sh +++ b/sqls/postgresql/create_odoo_db.sh @@ -7,7 +7,7 @@ function create_user() { local password=$2 echo " Creating '$user' user..." psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" $POSTGRES_DB <<-EOSQL - CREATE USER $user WITH UNENCRYPTED PASSWORD '$password'; + CREATE USER $user WITH PASSWORD '$password'; ALTER USER $user CREATEDB; EOSQL } diff --git a/sqls/postgresql/create_openelis_db.sh b/sqls/postgresql/create_openelis_db.sh index d4072ef..e7abd28 100755 --- a/sqls/postgresql/create_openelis_db.sh +++ b/sqls/postgresql/create_openelis_db.sh @@ -8,7 +8,7 @@ function create_user_and_database() { local password=$3 echo " Creating 'OpenELIS' user and database..." psql -v ON_ERROR_STOP=1 --username postgres postgres <<-EOSQL - CREATE USER $user WITH UNENCRYPTED PASSWORD '$password'; + CREATE USER $user WITH PASSWORD '$password'; CREATE DATABASE $database; GRANT ALL PRIVILEGES ON DATABASE $database TO $user; EOSQL