From ace57eaf2762c8cba4f7f11100578bcc1ee2e6e6 Mon Sep 17 00:00:00 2001 From: Alex Bezdieniezhnykh Date: Thu, 14 Nov 2024 21:14:26 +0200 Subject: [PATCH] postgres works --- Azaion.Api/.env | 1 - env/02 db-scripts/00_install.sh | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) delete mode 100644 Azaion.Api/.env create mode 100644 env/02 db-scripts/00_install.sh diff --git a/Azaion.Api/.env b/Azaion.Api/.env deleted file mode 100644 index ff7579e..0000000 --- a/Azaion.Api/.env +++ /dev/null @@ -1 +0,0 @@ -ASPNETCORE_JwtConfig__Secret=sdkfjghbsdfklhjgvbsdkljfhbvasklhfgsdfvh \ No newline at end of file diff --git a/env/02 db-scripts/00_install.sh b/env/02 db-scripts/00_install.sh new file mode 100644 index 0000000..9bc8e96 --- /dev/null +++ b/env/02 db-scripts/00_install.sh @@ -0,0 +1,14 @@ +# 01 install postgres, login via system acc, and start psql: +sudo apt install -y postgresql +sudo -i -u postgres +psql + +# 02 Edit /etc/postgres/{Version}/main/postgresql.conf and set next: +# listen_addresses = '*' # by default it's bound to localhost, * allows connect from all addresses +# port = 4312 # security reasons + +# 03 Edit /etc/postgres/{Version}/main/pg_hba.conf and set next to the end of the file: +# host all all all md5 + +# 04 restart to apply changes +systemctl restart postgresql \ No newline at end of file