Skip to content

Instantly share code, notes, and snippets.

@matejaputic
Last active May 26, 2026 08:17
Show Gist options
  • Select an option

  • Save matejaputic/7a5660eed28dc733362b2a171b69ddcb to your computer and use it in GitHub Desktop.

Select an option

Save matejaputic/7a5660eed28dc733362b2a171b69ddcb to your computer and use it in GitHub Desktop.
Hister Kubernetes Resources
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: hister
app.kubernetes.io/name: hister
name: hister
namespace: hister
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: hister
template:
metadata:
labels:
app.kubernetes.io/component: hister
spec:
containers:
- env:
- name: HISTER__SERVER__BASE_URL
value: https://hister.example.com
- name: HISTER_PORT
value: "4433"
image: ghcr.io/asciimoo/hister:master-root
imagePullPolicy: Always
livenessProbe:
exec:
command:
- wget -q --tries=1 --spider http://localhost:4433/ || exit 1
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
name: hister
ports:
- containerPort: 4433
protocol: TCP
securityContext:
capabilities:
allowPrivilegeEscalation: false
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /hister/data
name: hister-data
- mountPath: /notes
name: hister-notes
initContainers:
- command:
- sh
- -c
- |
cp /config/config.yml /hister/data/config.yml
chmod 0644 /hister/data/config.yml
image: busybox:1.36
name: copy-config
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsGroup: 1000
runAsUser: 1000
volumeMounts:
- mountPath: /hister/data
name: hister-data
- mountPath: /config
name: hister-config
readOnly: true
restartPolicy: Always
securityContext:
fsGroup: 2000
fsGroupChangePolicy: OnRootMismatch
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
volumes:
- emptyDir:
medium: Memory
sizeLimit: 16Mi
name: hister-data
- emptyDir:
medium: Memory
sizeLimit: 96Mi
name: hister-notes
- name: hister-config
secret:
items:
- key: config.yml
path: config.yml
secretName: hister-config
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: hister
app.kubernetes.io/name: hister
name: hister
namespace: hister
spec:
ports:
- name: "4433"
port: 4433
targetPort: 4433
selector:
app.kubernetes.io/component: hister
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
labels:
app.kubernetes.io/component: hister
app.kubernetes.io/name: hister
name: hister
namespace: hister
spec:
hostnames:
- hister.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: traefik
namespace: network
sectionName: websecure
rules:
- backendRefs:
- group: ""
kind: Service
name: hister
port: 4433
weight: 1
matches:
- path:
type: PathPrefix
value: /
---
apiVersion: v1
kind: Secret
metadata:
name: hister-config
type: Opaque
stringData:
config.yml: |
app:
directory: '~/.config/hister'
search_url: 'https://google.com/search?q={query}'
log_level: 'info'
open_results_on_new_tab: false
server:
address: '127.0.0.1:4433'
base_url: 'http://127.0.0.1:4433'
database: 'db.sqlite3'
oauth:
github:
client_id: '8d7eaa77-e048-4fd7-acb0-896babdee257'
client_secret: 'S9vm3notarealsecretjBIpRLBmtqGeK'
indexer:
detect_languages: true
directories:
- path: '~/notes'
filetypes: [ 'txt', 'md' ]
crawler:
backend: 'http'
timeout: 5
delay: 1
user_agent: 'Hister'
semantic_search:
enable: false
embedding_endpoint: 'http://ai.example.com:11434/v1/embeddings'
embedding_model: 'qwen3-embedding:8b'
dimensions: 4096
max_context_length: 4096
chunk_overlap: 128
similarity_threshold: 0.1
result_limit: 50
semantic_weight: 0.4
hotkeys:
web:
'/': 'focus_search_input'
'enter': 'open_result'
'alt+enter': 'open_result_in_new_tab'
'alt+j': 'select_next_result'
'alt+k': 'select_previous_result'
'alt+o': 'open_query_in_search_engine'
'alt+v': 'view_result_popup'
'tab': 'autocomplete'
'?': 'show_hotkeys'
sensitive_content_patterns:
aws_access_key: '(^|[\s"''])AKIA[0-9A-Z]{16}([\s"'']|$)'
github_token: '(ghp|gho|ghu|ghs|ghr)_[a-zA-Z0-9]{36}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment