blob: b10bc7fff09ac75e4c2b3aa6ead9e357a860aafb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
apiVersion: v1
kind: ConfigMap
metadata:
name: geopulse
data:
GEOPULSE_UI_URL: https://where.gzr.im
GEOPULSE_AUTH_SECURE_COOKIES: true
GEOPULSE_AUTH_REGISTRATION_ENABLED: true
GEOPULSE_AUTH_OIDC_REGISTRATION_ENABLED: true
GEOPULSE_AUTH_PASSWORD_REGISTRATION_ENABLED: false
GEOPULSE_BACKEND_URL: http://localhost:8080
GEOPULSE_OIDC_ENABLED: true
GEOPULSE_OIDC_PROVIDER_GENERIC_ENABLED: true
GEOPULSE_OIDC_PROVIDER_GENERIC_NAME: login.gzr.im
GEOPULSE_OIDC_PROVIDER_GENERIC_DISCOVERY_URL: https://login.gzr.im/.well-known/openid-configuration
GEOPULSE_OIDC_PROVIDER_GENERIC_ICON: pi pi-lock
OSM_RESOLVER: 127.0.0.11 9.9.9.9
# GEOPULSE_GEOCODING_DELAY_MS: 1000
GEOPULSE_GEOCODING_PRIMARY_PROVIDER: nominatim
GEOPULSE_GEOCODING_FALLBACK_PROVIDER: photon
GEOPULSE_GEOCODING_PHOTON_ENABLED: true
GEOPULSE_GEOCODING_NOMINATIM_ENABLED: true
# GEOPULSE_SHARE_BASE_URL:
GEOPULSE_MQTT_ENABLED: false
---
apiVersion: v1
kind: Pod
metadata:
name: geopulse
labels:
traefik.enable: true
traefik.http.routers.geopulse.tls: true
traefik.http.routers.geopulse.tls.certresolver: le
traefik.http.routers.geopulse.entrypoints: http,https
traefik.http.routers.geopulse.rule: Host(`where.gzr.im`)
traefik.http.routers.geopulse.service: geopulse
traefik.http.services.geopulse.loadbalancer.server.port: 80
# metrics
traefik.http.middlewares.replacepath-metrics-geopulse.replacepath.path: /api/prometheus/metrics
traefik.http.routers.geopulse-metrics.entrypoints: metrics
traefik.http.routers.geopulse-metrics.rule: Path(`/metrics/geopulse`)
traefik.http.routers.geopulse-metrics.middlewares: replacepath-metrics-geopulse
spec:
restartPolicy: Never
dnsPolicy: Default
containers:
- name: backend
image: ghcr.io/tess1o/geopulse-backend:${version}-native
restartPolicy: OnFailure
envFrom:
- secretRef:
name: geopulse
- configMapRef:
name: geopulse
volumeMounts:
- name: keys
mountPath: /app/keys
readOnly: true
ports:
- containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /api/health
port: 8080
initialDelaySeconds: 20
resources:
limits:
memory: 512Mi
- name: ui
image: ghcr.io/tess1o/geopulse-ui:${version}
envFrom:
- secretRef:
name: geopulse
- configMapRef:
name: geopulse
ports:
- containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
resources:
limits:
memory: 256Mi
- name: postgres
image: index.docker.io/postgis/postgis:17-3.5
ports:
- containerPort: 5432
hostIP: 100.82.12.64
hostPort: 25432
volumeMounts:
- name: pg-data
mountPath: /var/lib/postgresql/data
envFrom:
- secretRef:
name: geopulse
- configMapRef:
name: geopulse
livenessProbe:
exec:
command: ["pg_isready", "-U", "geopulse"]
initialDelaySeconds: 5
resources:
limits:
memory: 128Mi
# Conservative PostgreSQL settings optimized for minimal resource usage
# Suitable for small deployments and idle GPS tracking workloads
args:
- -c
- shared_buffers=256MB
- -c
- work_mem=8MB
- -c
- maintenance_work_mem=64MB
- -c
- effective_cache_size=1GB
- -c
- max_wal_size=512MB
- -c
- checkpoint_completion_target=0.9
- -c
- wal_buffers=16MB
- -c
- random_page_cost=1.1
- -c
- effective_io_concurrency=100
- -c
- autovacuum_naptime=60s
- -c
- autovacuum_vacuum_scale_factor=0.2
- -c
- log_min_duration_statement=5000
- -c
- track_io_timing=on
volumes:
- name: keys
hostPath:
path: /var/lib/geopulse/keys
type: Directory
- name: pg-data
hostPath:
path: /var/lib/geopulse/data
type: DirectoryOrCreate
|