Skip to content

Commit add51e7

Browse files
committed
Add home page logs to goaccess
1 parent d9ac4c1 commit add51e7

File tree

4 files changed

+23
-59
lines changed

4 files changed

+23
-59
lines changed

gitlist/goaccess/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ RUN addgroup -g 101 nginx && \
4545
USER nginx
4646

4747
# Run the application
48-
ENTRYPOINT ["sh", "-c", "goaccess /var/log/nginx/access.log* --unknowns-as-crawlers --persist --restore --db-path=/var/log/nginx/goaccess --config-file=/opt/goaccess.conf"]
48+
ENTRYPOINT ["sh", "-c", "goaccess /var/log/nginx/access*.log* --unknowns-as-crawlers --persist --restore --db-path=/var/log/nginx/goaccess --config-file=/opt/goaccess.conf"]
4949

kubernetes/cronjob-logrotate.yaml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ spec:
2929
POD=$(kubectl get pods -l app=git-repo -o jsonpath='{.items[0].metadata.name}')
3030
kubectl exec $POD -c nginx -- kill -USR1 1
3131
kubectl exec $POD -c goaccess -- kill -USR1 1
32+
POD2=$(kubectl get pods -l app=code-home -o jsonpath='{.items[0].metadata.name}')
33+
kubectl exec $POD2 -c code-home -- kill -USR1 1
3234
resources:
3335
limits:
3436
cpu: 100m
@@ -51,44 +53,3 @@ spec:
5153
- name: nginx-logs
5254
persistentVolumeClaim:
5355
claimName: nginx-logs
54-
# ---
55-
# apiVersion: apps/v1
56-
# kind: Deployment
57-
# metadata:
58-
# name: nginx-logrotate-signal
59-
# namespace: bioc-code-explorer
60-
# spec:
61-
# strategy:
62-
# type: Recreate
63-
# selector:
64-
# matchLabels:
65-
# app: nginx-logrotate-signal
66-
# replicas: 1
67-
# template:
68-
# metadata:
69-
# labels:
70-
# app: nginx-logrotate-signal
71-
# spec:
72-
# serviceAccountName: logrotate-signal-sa
73-
# containers:
74-
# - name: signal-nginx
75-
# image: grimbough/code.bioc-logrotate:0.0.1
76-
# # command: [ "sh", "-c", "--" ]
77-
# # args: [ "while true; do sleep 30; done;" ]
78-
# command:
79-
# - /bin/sh
80-
# - -c
81-
# - |
82-
# logrotate --verbose --debug --log=/var/log/nginx/access.log --state=/tmp/logroate_tmp /etc/logrotate.d/nginx
83-
# sleep(1)
84-
# POD=$(kubectl get pods -l app=git-repo -o jsonpath='{.items[0].metadata.name}')
85-
# kubectl exec $POD -c nginx -- kill -USR1 1
86-
# kubectl exec $POD -c goaccess -- kill -USR1 1
87-
# resources:
88-
# limits:
89-
# cpu: 100m
90-
# memory: 128Mi
91-
# requests:
92-
# cpu: 100m
93-
# memory: 128Mi
94-
# restartPolicy: Always

kubernetes/deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ spec:
5050
volumeMounts:
5151
- mountPath: "/var/git"
5252
name: git-repo-iscsi
53+
readOnly: true
5354
- mountPath: "/var/www/html"
5455
name: application
5556
ports:
@@ -77,8 +78,10 @@ spec:
7778
volumeMounts:
7879
- mountPath: "/var/git"
7980
name: git-repo-iscsi
81+
readOnly: true
8082
- mountPath: "/var/www/html"
8183
name: application
84+
readOnly: true
8285
- mountPath: "/var/log/nginx"
8386
name: nginx-logs
8487
- mountPath: "/var/shared"
@@ -106,7 +109,7 @@ spec:
106109
drop:
107110
- ALL
108111
- name: goaccess
109-
image: grimbough/code.bioc-goaccess:0.0.1
112+
image: grimbough/code.bioc-goaccess:0.0.2
110113
imagePullPolicy: "Always"
111114
volumeMounts:
112115
- mountPath: "/var/log/nginx"

kubernetes/service.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: git-repo
5-
namespace: bioc-nginx-test
5+
namespace: bioc-code-explorer
66
spec:
77
type: ClusterIP
88
ports:
@@ -12,19 +12,19 @@ spec:
1212
protocol: TCP
1313
selector:
1414
app: git-repo
15-
# ---
16-
# apiVersion: v1
17-
# kind: Service
18-
# metadata:
19-
# name: zoekt-search
20-
# namespace: bioc-code-explorer
21-
# spec:
22-
# type: ClusterIP
23-
# ports:
24-
# - name: http
25-
# port: 8080
26-
# targetPort: 8080
27-
# protocol: TCP
28-
# selector:
29-
# app: zoekt-search
15+
---
16+
apiVersion: v1
17+
kind: Service
18+
metadata:
19+
name: zoekt-search
20+
namespace: bioc-code-explorer
21+
spec:
22+
type: ClusterIP
23+
ports:
24+
- name: http
25+
port: 8080
26+
targetPort: 8080
27+
protocol: TCP
28+
selector:
29+
app: zoekt-search
3030

0 commit comments

Comments
 (0)