Skip to content

Commit 1b4b79e

Browse files
committed
add homebox
1 parent 214b209 commit 1b4b79e

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed

tools/homebox/1.pvc.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
name: homebox
6+
namespace: tools
7+
spec:
8+
resources:
9+
requests:
10+
storage: 20Gi
11+
accessModes:
12+
- ReadWriteMany
13+
storageClassName: nfs-storage

tools/homebox/2.service.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: homebox
6+
namespace: tools
7+
labels:
8+
app: homebox
9+
spec:
10+
sessionAffinity: ClientIP
11+
selector:
12+
app: homebox
13+
type: ClusterIP
14+
ports:
15+
- name: http
16+
protocol: TCP
17+
port: 7745
18+
targetPort: 7745
19+
---
20+
apiVersion: networking.k8s.io/v1
21+
kind: Ingress
22+
metadata:
23+
name: homebox
24+
namespace: tools
25+
labels:
26+
app: homebox
27+
spec:
28+
ingressClassName: nginx
29+
rules:
30+
- host: homebox.github.icu
31+
http:
32+
paths:
33+
- backend:
34+
service:
35+
name: homebox
36+
port:
37+
number: 7745
38+
path: /
39+
pathType: Prefix
40+
tls:
41+
- hosts:
42+
- homebox.github.icu
43+
secretName: github-tls

tools/homebox/3.deployment.yaml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: homebox
6+
name: homebox
7+
namespace: tools
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: homebox
13+
template:
14+
metadata:
15+
labels:
16+
app: homebox
17+
spec:
18+
containers:
19+
- name: homebox
20+
env:
21+
- name: HBOX_WEB_MAX_UPLOAD_SIZE
22+
value: "10"
23+
- name: HBOX_LOG_FORMAT
24+
value: text
25+
- name: HBOX_LOG_LEVEL
26+
value: info
27+
- name: TZ
28+
value: Asia/Shanghai
29+
image: registry.cn-hangzhou.aliyuncs.com/jeson/homebox:latest
30+
imagePullPolicy: IfNotPresent
31+
ports:
32+
- containerPort: 7745
33+
name: http
34+
protocol: TCP
35+
resources:
36+
limits:
37+
cpu: 500m
38+
memory: 1Gi
39+
requests:
40+
cpu: 100m
41+
memory: 500Mi
42+
securityContext:
43+
privileged: true
44+
runAsUser: 0
45+
livenessProbe:
46+
failureThreshold: 5
47+
initialDelaySeconds: 30
48+
periodSeconds: 5
49+
successThreshold: 1
50+
tcpSocket:
51+
port: 7745
52+
timeoutSeconds: 3
53+
readinessProbe:
54+
failureThreshold: 5
55+
initialDelaySeconds: 10
56+
periodSeconds: 5
57+
successThreshold: 1
58+
tcpSocket:
59+
port: 7745
60+
timeoutSeconds: 3
61+
volumeMounts:
62+
- name: localtime
63+
mountPath: /etc/localtime
64+
- name: homebox
65+
mountPath: /data
66+
subPath: homebox
67+
volumes:
68+
- name: localtime
69+
hostPath:
70+
path: /etc/localtime
71+
type: ""
72+
- name: homebox
73+
persistentVolumeClaim:
74+
claimName: homebox

tools/homebox/readme.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# 参考
2+
- [Docker部署HomeBox家庭库存管理系统][1]
3+
4+
[1]: https://mp.weixin.qq.com/s/WjTu2bla8XLZowpX1WP8vQ

0 commit comments

Comments
 (0)