Files
wild-directory/postgres/versions/1/deployment.yaml
Paul Payne 4d983819c9 feat(supabase): add services and statefulset for database management
feat(synapse): update ingress to use traefik ingress class and bump version

feat(syncthing-discovery): introduce syncthing discovery service with deployment and ingress

feat(syncthing-relay): add syncthing relay server with deployment and ingress configuration

fix(taiga): update liveness and readiness probes to use tcpSocket for health checks

fix(taiga): change PVC access mode to ReadWriteMany for media and static storage

feat(traefik): add icon and ignore rules for traefik service

docs(ushahidi): add notes for Redis configuration and Laravel startup probe adjustments

feat(ushahidi): implement dedicated Redis deployment for Ushahidi

fix(vllm): update deployment strategy and readiness/liveness probes for improved stability

fix(writefreely): pin writefreely image version to v0.15.1 for consistency

docs(zulip): add notes for TLS-terminating reverse proxy configuration and expected behavior
2026-07-02 21:34:27 +00:00

74 lines
2.5 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
seccompProfile:
type: RuntimeDefault
containers:
- name: postgres
image: "pgvector/pgvector:pg15"
command: ["/bin/bash", "-c"]
args:
- |
# 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
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
env:
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: TZ
value: "UTC"
- name: POSTGRES_DB
value: "{{ .database }}"
- name: POSTGRES_USER
value: "{{ .user }}"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secrets
key: password
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: postgres-pvc