🚀 nitter

This commit is contained in:
auricom
2022-10-23 15:50:37 +02:00
parent fbb36e3b5c
commit 25c1d2bc12
6 changed files with 139 additions and 3 deletions

View File

@@ -0,0 +1,45 @@
[Server]
address = "0.0.0.0"
port = 8080
https = false # disable to enable cookies when not using https
httpMaxConnections = 100
staticDir = "./public"
title = "nitter"
hostname = "nitter.${SECRET_CLUSTER_DOMAIN}"
[Cache]
listMinutes = 240 # how long to cache list info (not the tweets, so keep it high)
rssMinutes = 10 # how long to cache rss queries
redisHost = "redis.default.svc.cluster.local." # Change to "nitter-redis" if using docker-compose
redisPort = 6379
redisPassword = ""
redisConnections = 20 # connection pool size
redisMaxConnections = 30
# max, new connections are opened when none are available, but if the pool size
# goes above this, they're closed when released. don't worry about this unless
# you receive tons of requests per second
[Config]
hmacKey = "${SECRET_NITTER_HMAC}" # random key for cryptographic signing of video urls
base64Media = false # use base64 encoding for proxied media urls
enableRSS = true # set this to false to disable RSS feeds
enableDebug = false # enable request logs and debug endpoints
#proxy = "" # http/https url, SOCKS proxies are not supported
#proxyAuth = ""
#tokenCount = 10
# minimum amount of usable tokens. tokens are used to authorize API requests,
# but they expire after ~1 hour, and have a limit of 187 requests.
# the limit gets reset every 15 minutes, and the pool is filled up so there's
# always at least $tokenCount usable tokens. again, only increase this if
# you receive major bursts all the time
# Change default preferences here, see src/prefs_impl.nim for a complete list
[Preferences]
theme = "Nitter"
replaceTwitter = "nitter.${SECRET_CLUSTER_DOMAIN}"
replaceYouTube = "invidious.${SECRET_CLUSTER_DOMAIN}"
replaceReddit = "libreddit.${SECRET_CLUSTER_DOMAIN}"
replaceInstagram = ""
proxyVideos = true
hlsPlayback = false
infiniteScroll = true

View File

@@ -0,0 +1,79 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: &app nitter
namespace: default
spec:
interval: 15m
chart:
spec:
chart: app-template
version: 0.2.2
sourceRef:
kind: HelmRepository
name: bjw-s-charts
namespace: flux-system
install:
createNamespace: true
remediation:
retries: 5
upgrade:
remediation:
retries: 5
dependsOn:
- name: postgres
namespace: default
values:
image:
repository: docker.io/zedeus/nitter
tag: 2ac3afa5b273a502d7632e9346c7c3bc9283fb48
service:
main:
ports:
http:
port: &port 8080
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /Jack/status/20
port: *port
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
startup:
enabled: false
ingress:
main:
enabled: true
ingressClassName: "nginx"
annotations:
auth.home.arpa/enabled: "true"
external-dns.home.arpa/enabled: "true"
hosts:
- host: &host "nitter.${SECRET_CLUSTER_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
persistence:
config:
enabled: true
type: configMap
name: *app
subPath: config.yml
mountPath: /src/nitter.conf
readOnly: false
podAnnotations:
secret.reloader.stakater.com/reload: *app
resources:
requests:
cpu: 50m
memory: 256Mi

View File

@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-release.yaml
configMapGenerator:
- name: nitter
files:
- config/config.yml
generatorOptions:
disableNameSuffixHash: true