Aptly and community search.

This commit is contained in:
2026-06-08 17:10:11 +00:00
parent 8117fb8175
commit 4eb722f393
17 changed files with 432 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
name: community-search
is: community-search
description: Community Search is a federated, self-hosted search engine built on community-curated indexes rather than global web crawling.
latest: "0"

View File

@@ -0,0 +1,84 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: community-search
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: web
template:
metadata:
labels:
component: web
spec:
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
seccompProfile:
type: RuntimeDefault
containers:
- name: community-search
image: payneio/community-search:0.1.1
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
ports:
- name: http
containerPort: 8080
env:
- name: COMMUNITY_SEARCH_BIND_ADDR
value: "0.0.0.0"
- name: COMMUNITY_SEARCH_PORT
value: "8080"
- name: COMMUNITY_SEARCH_DATA_DIR
value: "/data"
- name: COMMUNITY_SEARCH_INDEX_PATH
value: "/data/index"
- name: COMMUNITY_SEARCH_ADMIN_TOKEN
valueFrom:
secretKeyRef:
name: community-search-secrets
key: adminToken
- name: SELF_URL
value: "{{ .selfUrl }}"
- name: SELF_NAME
value: "{{ .selfName }}"
- name: RUST_LOG
value: "community_search=info,tower_http=warn"
volumeMounts:
- name: data
mountPath: /data
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1
memory: 1Gi
readinessProbe:
httpGet:
path: /api/collections
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /api/collections
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
volumes:
- name: data
persistentVolumeClaim:
claimName: community-search-data

View File

@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: community-search
annotations:
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
external-dns.alpha.kubernetes.io/ttl: "60"
spec:
ingressClassName: traefik
rules:
- host: {{ .domain }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: community-search
port:
number: 80
tls:
- hosts:
- {{ .domain }}
secretName: {{ .tlsSecretName }}

View File

@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: community-search
labels:
- includeSelectors: true
pairs:
app: community-search
managedBy: kustomize
partOf: wild-cloud
resources:
- namespace.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
- pvc.yaml

View File

@@ -0,0 +1,12 @@
version: 0.1.1-1
requires: []
defaultConfig:
namespace: community-search
externalDnsDomain: '{{ .cloud.domain }}'
domain: search.{{ .cloud.domain }}
tlsSecretName: wildcard-wild-cloud-tls
storage: 10Gi
selfUrl: 'https://search.{{ .cloud.domain }}'
selfName: 'Community Search'
defaultSecrets:
- key: adminToken

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: "{{ .namespace }}"

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: community-search-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .storage }}

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: community-search
spec:
type: ClusterIP
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
component: web