commit: ceb07772d06be3fb0e8590eed9963cfc29284866
parent 39a96876ef1dd232c725cc10dccdc4f1e154a8fc
Author: feld <feld@feld.me>
Date: Fri, 11 Nov 2022 17:38:51 +0000
Merge branch 'custom-db-port' into 'develop'
allow custom db port
Closes #2981
See merge request pleroma/pleroma!3775
Diffstat:
6 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
@@ -5,6 +5,7 @@ variables: &global_variables
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_HOST: postgres
+ DB_PORT: 5432
MIX_ENV: test
cache: &global_cache_policy
diff --git a/config/benchmark.exs b/config/benchmark.exs
@@ -40,6 +40,7 @@ config :pleroma, Pleroma.Repo,
password: "postgres",
database: "pleroma_benchmark",
hostname: System.get_env("DB_HOST") || "localhost",
+ port: System.get_env("DB_PORT") || "5432",
pool_size: 10
# Reduce hash rounds for testing
diff --git a/config/docker.exs b/config/docker.exs
@@ -18,6 +18,7 @@ config :pleroma, Pleroma.Repo,
password: System.fetch_env!("DB_PASS"),
database: System.get_env("DB_NAME", "pleroma"),
hostname: System.get_env("DB_HOST", "db"),
+ port: System.get_env("DB_PORT", "5432"),
pool_size: 10
# Configure web push notifications
diff --git a/config/test.exs b/config/test.exs
@@ -47,6 +47,7 @@ config :pleroma, Pleroma.Repo,
password: "postgres",
database: "pleroma_test",
hostname: System.get_env("DB_HOST") || "localhost",
+ port: System.get_env("DB_PORT") || "5432",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 50
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
@@ -3,7 +3,7 @@
set -e
echo "-- Waiting for database..."
-while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma} -t 1; do
+while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-pleroma} -t 1; do
sleep 1s
done
diff --git a/installation/pleroma-mongooseim.cfg b/installation/pleroma-mongooseim.cfg
@@ -466,7 +466,7 @@
%% == PostgreSQL ==
%% {rdbms, global, default, [{workers, 10}],
-%% [{server, {pgsql, "server", 5432, "database", "username", "password"}}]},
+%% [{server, {pgsql, "server", "port", "database", "username", "password"}}]},
%% == ODBC (MSSQL) ==
%% {rdbms, global, default, [{workers, 10}],