Skip to content

Commit

Permalink
build: bumping up to v0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
flxxyz committed Jul 20, 2023
1 parent 90aea4e commit 24a30ff
Show file tree
Hide file tree
Showing 8 changed files with 282 additions and 227 deletions.
2 changes: 1 addition & 1 deletion .bump/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.3
0.2.4
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
},
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
}
230 changes: 226 additions & 4 deletions deployment/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,235 @@ apiVersion: v1
kind: Service
metadata:
namespace: denostr
name: denostr-svc
name: denostr-relay-worker-svc
labels:
component: denostr
app: denostr
component: relay-worker
spec:
ports:
- name: ws
port: 8008
port: 80
targetPort: 8008
selector:
component: denostr
app: denostr
component: relay-worker

---
apiVersion: v1
kind: Service
metadata:
namespace: denostr
name: denostr-relay-maintenance-svc
labels:
app: denostr
component: relay-maintenance
spec:
ports:
- name: ws
port: 80
targetPort: 8008
selector:
app: denostr
component: relay-maintenance

---
apiVersion: v1
kind: Service
metadata:
namespace: denostr
name: denostr-relay-static-mirroring-svc
labels:
app: denostr
component: relay-static-mirroring
spec:
ports:
- name: ws
port: 80
targetPort: 8008
selector:
app: denostr
component: relay-static-mirroring

---
apiVersion: v1
data:
settings.yaml: |
info:
relay_url: wss://your-domain.com
name: "nostr relay by denostr"
description: Deno-based, cloud-native nostr implementation supported by ByteTrade and Revo, forked from nostream.
pubkey: replace-with-your-pubkey-in-hex
contact: mailto:[email protected]
payments:
enabled: false
processor: lnbits
feeSchedules:
admission:
- enabled: false
description: Admission fee charged per public key in msats (1000 msats = 1 satoshi)
amount: 1000000
whitelists:
pubkeys:
- replace-with-your-pubkey-in-hex
event_kinds:
- 9735 # Nip-57 Lightning Zap Receipts
paymentsProcessors:
zebedee:
baseURL: https://api.zebedee.io/
callbackBaseURL: https://relay.your-domain.com/callbacks/zebedee
ipWhitelist:
- "3.225.112.64"
- "::ffff:3.225.112.64"
lnbits:
baseURL: https://lnbits.your-domain.com/
callbackBaseURL: https://relay.your-domain.com/callbacks/lnbits
lnurl:
invoiceURL: https://getalby.com/lnurlp/your-username
nodeless:
baseURL: https://nodeless.io
storeId: your-nodeless-io-store-id
opennode:
baseURL: api.opennode.com
callbackBaseURL: https://relay.your-domain.com/callbacks/opennode
network:
maxPayloadSize: 524288
# Comment the next line if using CloudFlare proxy
remoteIpHeader: x-forwarded-for
# Uncomment the next line if using CloudFlare proxy
# remoteIpHeader: cf-connecting-ip
workers:
count: 0
mirroring:
static: []
limits:
invoice:
rateLimits:
- period: 60000
rate: 12
- period: 3600000
rate: 30
ipWhitelist:
- "::1"
- "10.10.10.1"
- "::ffff:10.10.10.1"
connection:
rateLimits:
- period: 1000
rate: 24
- period: 60000
rate: 72
ipWhitelist:
- "::1"
- "10.10.10.1"
- "::ffff:10.10.10.1"
event:
eventId:
minLeadingZeroBits: 0
kind:
whitelist: []
blacklist: []
pubkey:
minBalance: 1000
minLeadingZeroBits: 0
whitelist: []
blacklist: []
createdAt:
maxPositiveDelta: 900
maxNegativeDelta: 0
content:
- description: 100 KB for event kind ranges 0-10 and 40-49
kinds:
- - 0
- 10
- - 40
- 49
maxLength: 102400
- description: 100 KB for event kind ranges 11-39 and 50-max
kinds:
- - 11
- 39
- - 50
- 9007199254740991
maxLength: 102400
rateLimits:
- description: 30 events/min for event kinds 0, 3, 40 and 41
kinds:
- 0
- 3
- 40
- 41
period: 60000
rate: 30
- description: 144 events/min for event kinds 1, 2, 4 and 42
kinds:
- 1
- 2
- 4
- 42
period: 60000
rate: 144
- description: 1200 events/min for encrypted channel event kinds 104 and 140-142
kinds:
- 104
- 140
- 141
- 142
period: 60000
rate: 1200
- description: 60 events/min for event kind ranges 5-7 and 43-49
kinds:
- - 5
- 7
- - 43
- 49
period: 60000
rate: 60
- description:
24 events/min for replaceable events and parameterized replaceable
events
kinds:
- - 10000
- 19999
- - 30000
- 39999
period: 60000
rate: 24
- description: 120 events/min for ephemeral events
kinds:
- - 20000
- 29999
period: 60000
rate: 120
- description: 4800 events/hour for all events
period: 3600000
rate: 4800
whitelists:
pubkeys: []
ipAddresses:
- "::1"
- "10.10.10.1"
- "::ffff:10.10.10.1"
client:
subscription:
maxSubscriptions: 10
maxFilters: 10
maxFilterValues: 2500
maxSubscriptionIdLength: 256
maxLimit: 5000
minPrefixLength: 4
message:
rateLimits:
- description: 720 raw messages/min
period: 60000
rate: 720
ipWhitelist:
- "::1"
- "10.10.10.1"
- "::ffff:10.10.10.1"
kind: ConfigMap
metadata:
labels:
app: denostr
component: relay-worker
name: denostr-relay-config
namespace: denostr
25 changes: 14 additions & 11 deletions deployment/maintenance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,35 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: denostr
name: denostr-maintenance-statefulset
name: denostr-relay-maintenance
labels:
component: denostr
app: denostr
component: relay-maintenance
spec:
serviceName: denostr-svc
replicas: 3
serviceName: denostr-relay-maintenance-svc
replicas: 1
selector:
matchLabels:
component: denostr
app: denostr
component: relay-maintenance
template:
metadata:
labels:
component: denostr
app: denostr
component: relay-maintenance
spec:
imagePullSecrets:
- name: ghcr
containers:
- name: relay
image: ghcr.io/denostr-lab/denostr:v0.2.3-maintenance
image: ghcr.io/denostr-lab/denostr:v0.2.4-maintenance
imagePullPolicy: Always
resources:
requests:
cpu: "100m"
memory: "100Mi"
limits:
cpu: "500m"
cpu: "300m"
memory: "500Mi"
env:
- name: MONGO_URI
Expand All @@ -38,11 +41,11 @@ spec:
name: ws
volumeMounts:
- mountPath: /app/.nostr
name: denostr-config-val
name: denostr-config-vol
volumes:
- name: denostr-config-val
- name: denostr-config-vol
configMap:
name: denostr-worker-config
name: denostr-relay-config
items:
- key: settings.yaml
path: settings.yaml
31 changes: 18 additions & 13 deletions deployment/static-mirroring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,51 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: denostr
name: denostr-static-mirroring-statefulset
name: denostr-relay-static-mirroring
labels:
component: denostr
app: denostr
component: relay-static-mirroring
spec:
serviceName: denostr-svc
replicas: 3
serviceName: denostr-relay-static-mirroring-svc
replicas: 1
selector:
matchLabels:
component: denostr
app: denostr
component: relay-static-mirroring
template:
metadata:
labels:
component: denostr
app: denostr
component: relay-static-mirroring
spec:
imagePullSecrets:
- name: ghcr
containers:
- name: relay
image: ghcr.io/denostr-lab/denostr:v0.2.3-static-mirroring
image: ghcr.io/denostr-lab/denostr:v0.2.4-static-mirroring
imagePullPolicy: Always
resources:
requests:
cpu: "100m"
memory: "100Mi"
limits:
cpu: "500m"
cpu: "300m"
memory: "500Mi"
env:
- name: DEBUG
value: "*"
- name: MONGO_URI
value: "mongodb://user:pass@host:port/db?replicaSet=rs0&authSource=admin"
ports:
- containerPort: 8008
name: ws
volumeMounts:
- mountPath: /app/.nostr
name: denostr-static-mirroring-config-val
name: denostr-config-vol
volumes:
- name: denostr-config-val
- name: denostr-config-vol
configMap:
name: denostr-worker-config
name: denostr-relay-config
items:
- key: settings.yaml
path: settings.yaml
- key: settings.yaml
path: settings.yaml
Loading

0 comments on commit 24a30ff

Please sign in to comment.