Reduces apps default resource usage.

This commit is contained in:
2026-06-19 21:38:56 +00:00
parent 63dcd1b82b
commit c223e2b5e0
55 changed files with 661 additions and 174 deletions

View File

@@ -18,19 +18,25 @@ spec:
containers:
- name: postgres
image: "pgvector/pgvector:pg15"
command: ["/bin/bash", "-c"]
args:
[
"-c",
"tcp_keepalives_idle=600",
"-c",
"tcp_keepalives_interval=30",
"-c",
"tcp_keepalives_count=3",
"-c",
"statement_timeout=300000",
"-c",
"idle_in_transaction_session_timeout=600000",
]
- |
# Install English Hunspell dictionary (needed by apps like Zulip for full-text search)
if [ ! -f /usr/share/postgresql/15/tsearch_data/en_us.dict ]; then
apt-get install -y -qq hunspell-en-us 2>/dev/null || true
[ -f /usr/share/hunspell/en_US.aff ] && cp /usr/share/hunspell/en_US.aff /usr/share/postgresql/15/tsearch_data/en_us.affix
[ -f /usr/share/hunspell/en_US.dic ] && cp /usr/share/hunspell/en_US.dic /usr/share/postgresql/15/tsearch_data/en_us.dict
fi
# Install PostGIS (needed by apps like Mobilizon for geographic data)
if [ ! -f /usr/share/postgresql/15/extension/postgis.control ]; then
apt-get update -qq 2>/dev/null && apt-get install -y -qq postgresql-15-postgis-3 postgresql-15-postgis-3-scripts 2>/dev/null || true
fi
exec docker-entrypoint.sh postgres \
-c tcp_keepalives_idle=600 \
-c tcp_keepalives_interval=30 \
-c tcp_keepalives_count=3 \
-c statement_timeout=300000 \
-c idle_in_transaction_session_timeout=600000
ports:
- containerPort: 5432
env:

View File

@@ -1,11 +1,11 @@
version: 1.0.0-2
version: 1.0.0-6
defaultConfig:
namespace: postgres
host: postgres.postgres.svc.cluster.local
port: 5432
database: postgres
user: postgres
storage: 10Gi
storage: 2Gi
backup:
restoreMode: in-place
defaultSecrets: