logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 36519bdbee321354788fde71e33e74d7f6a353d1
parent 39a96876ef1dd232c725cc10dccdc4f1e154a8fc
Author: Iván Raskovsky <raskovsky+git@gmail.com>
Date:   Fri, 11 Nov 2022 12:22:21 -0300

allow custom db port

Diffstat:

M.gitlab-ci.yml1+
Mconfig/benchmark.exs1+
Mconfig/docker.exs1+
Mconfig/test.exs1+
Mdocker-entrypoint.sh2+-
Minstallation/pleroma-mongooseim.cfg2+-
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_HOST") || "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}],