Reduces apps default resource usage.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user