Perplexica
Perplexica copied to clipboard
Kubernetes / Helm package for Perplexica
It would be great to see a Helm chart for this to run easily on Kubernetes! A bit busy with my 9-5 job at the moment, but might be able to take a look at it in the coming weeks.
Hello @michael-willingham did you have time to work on it ?
Sadly I have not had the time! Work and life have kept me quite busy. This might be better off if someone else could take a look tbh
ok no worries could you just automate at least the docker container creation with the github actions template. With this (5min of clicks) you can automate the build and publish of your docker image on this github repo soo I can write a kubernetes deployment to do some testings
you can do it like this : https://github.com/ItzCrazyKns/Perplexica/new/main?filename=.github%2Fworkflows%2Fdocker-publish.yml&workflow_template=ci%2Fdocker-publish
This is not my repo, I'm just a user! That's a question for @ItzCrazyKns
Hey @ItzCrazyKns! I just started to work on the Helm Chart based on the current Docker Compose file. I'm closed to push the PR. Just need to finish the PV&PVC.
Hi, @ItzCrazyKns! I was able to deploy Perplexica a few minutes ago on my Kubernetes cluster 🎉
But the CORS config is restricting access to the backend API to http://127.0.0.1, where I deployed it with a public URL:
To solve that, I will check how the CORS is configured on the backend side.
Nice work
here is my deployments
apiVersion: apps/v1
kind: Deployment
metadata:
name: searxng-deployment
namespace: search
labels:
app: searxng-deployment
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
selector:
matchLabels:
app: searxng-deployment
template:
metadata:
name: searxng-deployment
labels:
app: searxng-deployment
spec:
restartPolicy: Always
containers:
- name: searxng
image: searxng/searxng:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
name: searxng
protocol: TCP
env:
- name: PUID
value: "1005"
- name: PGID
value: "1005"
- name: TZ
value: "Europe/Paris"
volumeMounts:
- name: searxng-config
mountPath: /etc/searxng
volumes:
- name: searxng-config
persistentVolumeClaim:
claimName: searxng-data
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-deployment
namespace: search
labels:
app: backend-deployment
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
selector:
matchLabels:
app: backend-deployment
template:
metadata:
name: backend-deployment
labels:
app: backend-deployment
spec:
restartPolicy: Always
containers:
- name: backend
image: itzcrazykns1337/perplexica-backend:main
imagePullPolicy: Always
ports:
- containerPort: 3001
name: backend
protocol: TCP
env:
- name: PUID
value: "1005"
- name: PGID
value: "1005"
- name: TZ
value: "Europe/Paris"
- name: SEARXNG_API_URL
value: searxng-service.search.svc.cluster.local
volumeMounts:
- name: backend-dbstore
mountPath: /home/perplexica/data
- name: uploads
mountPath: /home/perplexica/uploads
- name: config
mountPath: /home/perplexica/config.toml
subPath: config.toml
volumes:
- name: backend-dbstore
persistentVolumeClaim:
claimName: backend-data
- name: uploads
persistentVolumeClaim:
claimName: backend-media
- name: config
configMap:
name: perplexica-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-deployment
namespace: search
labels:
app: frontend-deployment
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
selector:
matchLabels:
app: frontend-deployment
template:
metadata:
name: frontend-deployment
labels:
app: frontend-deployment
spec:
restartPolicy: Always
containers:
- name: frontend
image: itzcrazykns1337/perplexica-frontend:main
imagePullPolicy: Always
ports:
- containerPort: 3001
name: frontend
protocol: TCP
env:
- name: NEXT_PUBLIC_API_URL
value: "https://perplexica-backend.domain/api"
- name: NEXT_PUBLIC_WS_URL
value: "wss://perplexica-backend.domain"
for some reason it is still trying to hit 127.0.0.1:3001, is there a way to fix this issue
@timoa its because the docker build file hard codes the args
perplexica-frontend:
build:
context: .
dockerfile: app.dockerfile
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
ill see if i can make a fix so its more k8s friendly