adding postgres
All checks were successful
CI/CD Pipeline / build (push) Successful in 9s

This commit is contained in:
2026-03-06 16:59:15 -07:00
parent ad45ff65e7
commit ff48786d24
4 changed files with 55 additions and 2 deletions

View File

@@ -11,6 +11,6 @@ data:
K8S_SERVICE_NAME: ai-ha-elixir-headless K8S_SERVICE_NAME: ai-ha-elixir-headless
RELEASE_COOKIE: elixir_ai_cluster_cookie RELEASE_COOKIE: elixir_ai_cluster_cookie
PHX_HOST: ai-ha.alexmickelson.guru PHX_HOST: ai-ha.alexmickelson.guru
DATABASE_URL: ecto://elixir_ai:elixir_ai@postgres-service.postgres/elixir_ai DATABASE_URL: ecto://elixir_ai:elixir_ai@postgres/elixir_ai
AI_RESPONSES_ENDPOINT: http://ai-snow.reindeer-pinecone.ts.net:9292/v1/chat/completions AI_RESPONSES_ENDPOINT: http://ai-snow.reindeer-pinecone.ts.net:9292/v1/chat/completions
AI_MODEL: gpt-oss-120b AI_MODEL: gpt-oss-120b

52
kubernetes/db.yml Normal file
View File

@@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: ai-ha-elixir
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:16
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: "elixir_ai"
- name: POSTGRES_PASSWORD
value: "elixir_ai"
- name: POSTGRES_DB
value: "elixir_ai"
readinessProbe:
exec:
command: ["pg_isready", "-U", "elixir_ai"]
initialDelaySeconds: 5
periodSeconds: 5
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: ai-ha-elixir
spec:
selector:
app: postgres
ports:
- port: 5432
targetPort: 5432

View File

@@ -67,3 +67,4 @@ spec:
limits: limits:
memory: "512Mi" memory: "512Mi"
cpu: "500m" cpu: "500m"