Skip to content

Commit 796a120

Browse files
committed
feat(web): Add Anubis
Block AI training by installing Anubis as a proxy.
1 parent 865aac3 commit 796a120

File tree

2 files changed

+53
-4
lines changed

2 files changed

+53
-4
lines changed

apps/web/base/deployment.yaml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,62 @@ spec:
2020
app: web
2121
spec:
2222
containers:
23+
- name: anubis
24+
image: ghcr.io/techarohq/anubis:latest
25+
imagePullPolicy: Always
26+
env:
27+
- name: "BIND"
28+
value: ":8080"
29+
- name: "DIFFICULTY"
30+
value: "4"
31+
- name: ED25519_PRIVATE_KEY_HEX
32+
valueFrom:
33+
secretKeyRef:
34+
name: anubis-key
35+
key: ED25519_PRIVATE_KEY_HEX
36+
- name: "METRICS_BIND"
37+
value: ":9090"
38+
- name: "SERVE_ROBOTS_TXT"
39+
value: "true"
40+
- name: "TARGET"
41+
value: "http://localhost:5001"
42+
- name: "OG_PASSTHROUGH"
43+
value: "true"
44+
- name: "OG_EXPIRY_TIME"
45+
value: "24h"
46+
resources:
47+
limits:
48+
cpu: 750m
49+
memory: 256Mi
50+
requests:
51+
cpu: 250m
52+
memory: 256Mi
53+
ports:
54+
- name: anubis
55+
containerPort: 8080
56+
protocol: TCP
57+
- name: anubis-metrics
58+
containerPort: 9090
59+
protocol: TCP
60+
securityContext:
61+
runAsUser: 1000
62+
runAsGroup: 1000
63+
runAsNonRoot: true
64+
allowPrivilegeEscalation: false
65+
capabilities:
66+
drop:
67+
- ALL
68+
seccompProfile:
69+
type: RuntimeDefault
2370
- name: web
2471
image: metacpan/metacpan-web:latest
2572
imagePullPolicy: Always
26-
command: [ "/uwsgi.sh" ]
27-
args: [ "--http-socket", ":5001" ]
73+
command: ["/uwsgi.sh"]
74+
args: ["--http-socket", ":5001"]
2875
ports:
29-
- containerPort: 5001
76+
- name: http
77+
containerPort: 5001
78+
protocol: TCP
3079
resources:
3180
# Manage how much memory is allocated, could add cpu if we wanted
3281
requests:

apps/web/base/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ metadata:
55
spec:
66
ports:
77
- port: 80
8-
targetPort: 5001
8+
targetPort: http
99
selector:
1010
app: web

0 commit comments

Comments
 (0)