chore: make docker
This commit is contained in:
91
k8s/deployment.yaml
Normal file
91
k8s/deployment.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: joel-bot
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: joel-bot-data
|
||||
namespace: joel-bot
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: joel-bot
|
||||
namespace: joel-bot
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: joel-bot
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: joel-bot
|
||||
spec:
|
||||
containers:
|
||||
- name: joel-bot
|
||||
image: ghcr.io/your-org/joel-bot:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: NODE_ENV
|
||||
value: "production"
|
||||
- name: LOG_LEVEL
|
||||
value: "info"
|
||||
- name: DATABASE_PATH
|
||||
value: /data/db.sqlite3
|
||||
- name: WEB_PORT
|
||||
value: "3000"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: joel-bot-env
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: joel-bot-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: joel-bot
|
||||
namespace: joel-bot
|
||||
spec:
|
||||
selector:
|
||||
app: joel-bot
|
||||
ports:
|
||||
- name: http
|
||||
port: 3000
|
||||
targetPort: http
|
||||
23
k8s/ingress.example.yaml
Normal file
23
k8s/ingress.example.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: joel-bot
|
||||
namespace: joel-bot
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
spec:
|
||||
rules:
|
||||
- host: joel.example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: joel-bot
|
||||
port:
|
||||
number: 3000
|
||||
tls:
|
||||
- hosts:
|
||||
- joel.example.com
|
||||
secretName: joel-bot-tls
|
||||
23
k8s/secret.example.yaml
Normal file
23
k8s/secret.example.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: joel-bot-env
|
||||
namespace: joel-bot
|
||||
type: Opaque
|
||||
stringData:
|
||||
DISCORD_TOKEN: ""
|
||||
DISCORD_CLIENT_ID: ""
|
||||
DISCORD_CLIENT_SECRET: ""
|
||||
OPENROUTER_API_KEY: ""
|
||||
OPENAI_API_KEY: ""
|
||||
HF_TOKEN: ""
|
||||
REPLICATE_API_KEY: ""
|
||||
FAL_KEY: ""
|
||||
KLIPY_API_KEY: ""
|
||||
ELEVENLABS_API_KEY: ""
|
||||
ELEVENLABS_VOICE_ID: ""
|
||||
ELEVENLABS_MODEL: "eleven_multilingual_v2"
|
||||
AI_CLASSIFICATION_MODEL: "google/gemma-3-12b-it:free"
|
||||
AI_CLASSIFICATION_FALLBACK_MODELS: "meta-llama/llama-3.3-70b-instruct:free,mistralai/mistral-small-3.1-24b-instruct:free"
|
||||
WEB_BASE_URL: "https://joel.example.com"
|
||||
SESSION_SECRET: "replace-with-a-long-random-secret"
|
||||
Reference in New Issue
Block a user