Skip to content

Commit 2b7c90e

Browse files
authored
Doc and deployment improvements (#402)
* Added env variables page with all possible environment variables for GeoPulse. * Simplified installation guide * Added images and refactored README * Updated readme * Updated readme * Updated readme * Fixed CSRF issue * Build dev images for ARM64 as well * Build dev images for ARM64 as well * Build dev images in compat mode
1 parent a756ef9 commit 2b7c90e

39 files changed

Lines changed: 1106 additions & 631 deletions

.env.example

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@
66
# The version of the app, frontend and backend should use the same version
77
GEOPULSE_VERSION=1.22.0
88

9-
# Frontend (UI) URLs - used in CORS policies (comma-separated for multiple access methods)
10-
# Local development: http://localhost:5555
11-
# Homelab example: http://localhost:5555,http://192.168.1.100:5555,http://your-tailscale-ip:5555
12-
# Production example: https://geopulse.yourdomain.com
9+
# Frontend (UI) URL (legacy)
10+
# DEPRECATED: kept for backward compatibility with older deployments.
11+
# New deployments should use GEOPULSE_CORS_ORIGINS and GEOPULSE_PUBLIC_BASE_URL.
1312
GEOPULSE_UI_URL=http://localhost:5555
1413

14+
# CORS configuration
15+
# Standard docker-compose deployment uses nginx reverse proxy and same-origin requests,
16+
# so CORS can be disabled by default.
17+
GEOPULSE_CORS_ENABLED=false
18+
# When CORS is enabled, set allowed origins as comma-separated URLs.
19+
# Example: http://localhost:5555,http://192.168.1.100:5555,https://geopulse.yourdomain.com
20+
GEOPULSE_CORS_ORIGINS=
21+
22+
# Public base URL for callback/link generation (optional, recommended for OIDC)
23+
# Example: https://geopulse.yourdomain.com
24+
GEOPULSE_PUBLIC_BASE_URL=
25+
1526
# Cookie domain for authentication cookies
1627
#
1728
# IMPORTANT: GeoPulse uses nginx to proxy all requests (frontend + backend), so the browser
@@ -80,9 +91,11 @@ GEOPULSE_MQTT_PASSWORD=change-this-mqtt-admin-password
8091
GEOPULSE_OIDC_ENABLED=false
8192

8293
# OIDC Callback URL Override (optional)
83-
# By default, uses the first URL from GEOPULSE_UI_URL.
84-
# Set this explicitly when GEOPULSE_UI_URL contains multiple comma-separated URLs for CORS,
85-
# or when you need a different callback URL than the UI URL.
94+
# Callback URL resolution order:
95+
# 1. GEOPULSE_OIDC_CALLBACK_BASE_URL (this value)
96+
# 2. GEOPULSE_PUBLIC_BASE_URL
97+
# 3. GEOPULSE_UI_URL (legacy fallback)
98+
# Set this explicitly when your callback base URL must differ from your public UI URL.
8699
# Example: GEOPULSE_OIDC_CALLBACK_BASE_URL=https://geopulse.mydomain.com
87100
GEOPULSE_OIDC_CALLBACK_BASE_URL=
88101

.github/workflows/dev-build.yml

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ permissions:
1212
contents: read
1313

1414
jobs:
15-
build-frontend:
16-
name: Build Frontend Multi-Arch (dev)
1715
build-frontend-amd64:
1816
name: Build Frontend AMD64 (dev)
1917
runs-on: ubuntu-latest
2018
steps:
2119
- name: Checkout code
2220
uses: actions/checkout@v4
2321

24-
- name: Set up QEMU
25-
uses: docker/setup-qemu-action@v3
2622
- name: Set up Docker Buildx
2723
uses: docker/setup-buildx-action@v3
2824

@@ -62,27 +58,20 @@ jobs:
6258
username: ${{ secrets.DOCKERHUB_USERNAME }}
6359
password: ${{ secrets.DOCKERHUB_TOKEN }}
6460

65-
- name: Build and push Frontend Multi-Arch (dev)
6661
- name: Build and push Frontend ARM64 (dev)
6762
uses: docker/build-push-action@v5
6863
with:
6964
context: .
7065
file: frontend/Dockerfile
71-
platforms: linux/amd64,linux/arm64
7266
platforms: linux/arm64
7367
push: true
7468
build-args: |
7569
VERSION=${{ env.DEV_VERSION }}
7670
tags: |
77-
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}
78-
cache-from: type=gha,scope=dev-frontend-multiarch
79-
cache-to: type=gha,mode=max,scope=dev-frontend-multiarch
8071
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}-arm64
8172
cache-from: type=gha,scope=dev-frontend-arm64
8273
cache-to: type=gha,mode=max,scope=dev-frontend-arm64
8374

84-
build-backend-native:
85-
name: Build Backend Native Multi-Arch (dev)
8675
create-frontend-manifest:
8776
name: Create Frontend Multi-Arch Manifest (dev)
8877
needs: [build-frontend-amd64, build-frontend-arm64]
@@ -102,15 +91,12 @@ jobs:
10291
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ env.DEV_VERSION }}-arm64
10392
10493
build-backend-native-amd64:
105-
name: Build Backend Native AMD64 (dev)
94+
name: Build Backend Native AMD64 Compatible (dev)
10695
runs-on: ubuntu-latest
10796
steps:
10897
- name: Checkout code
10998
uses: actions/checkout@v4
11099

111-
- name: Set up QEMU
112-
uses: docker/setup-qemu-action@v3
113-
114100
- name: Set up Docker Buildx
115101
uses: docker/setup-buildx-action@v3
116102

@@ -120,28 +106,23 @@ jobs:
120106
username: ${{ secrets.DOCKERHUB_USERNAME }}
121107
password: ${{ secrets.DOCKERHUB_TOKEN }}
122108

123-
- name: Build and push Backend Native Multi-Arch (dev)
124-
- name: Build and push Backend Native AMD64 (dev)
109+
- name: Build and push Backend Native AMD64 Compatible (dev)
125110
uses: docker/build-push-action@v5
126111
with:
127112
context: .
128113
file: backend/Dockerfile.native
129-
platforms: linux/amd64,linux/arm64
130114
platforms: linux/amd64
131115
push: true
132116
build-args: |
133117
VERSION=${{ env.DEV_VERSION }}-native
134-
QUARKUS_NATIVE_BUILD_ARGS=
118+
QUARKUS_NATIVE_BUILD_ARGS=,-march=x86-64-v2
135119
tags: |
136-
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native
137-
cache-from: type=gha,scope=dev-backend-native-multiarch
138-
cache-to: type=gha,mode=max,scope=dev-backend-native-multiarch
139120
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-amd64
140-
cache-from: type=gha,scope=dev-backend-native-amd64
141-
cache-to: type=gha,mode=max,scope=dev-backend-native-amd64
121+
cache-from: type=gha,scope=dev-backend-native-amd64-compat
122+
cache-to: type=gha,mode=max,scope=dev-backend-native-amd64-compat
142123

143124
build-backend-native-arm64:
144-
name: Build Backend Native ARM64 (dev)
125+
name: Build Backend Native ARM64 Compatible (dev)
145126
runs-on: ubuntu-24.04-arm
146127
steps:
147128
- name: Checkout code
@@ -156,7 +137,7 @@ jobs:
156137
username: ${{ secrets.DOCKERHUB_USERNAME }}
157138
password: ${{ secrets.DOCKERHUB_TOKEN }}
158139

159-
- name: Build and push Backend Native ARM64 (dev)
140+
- name: Build and push Backend Native ARM64 Compatible (dev)
160141
uses: docker/build-push-action@v5
161142
with:
162143
context: .
@@ -165,11 +146,11 @@ jobs:
165146
push: true
166147
build-args: |
167148
VERSION=${{ env.DEV_VERSION }}-native
168-
QUARKUS_NATIVE_BUILD_ARGS=
149+
QUARKUS_NATIVE_BUILD_ARGS=,-march=armv8-a+nolse
169150
tags: |
170151
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-arm64
171-
cache-from: type=gha,scope=dev-backend-native-arm64
172-
cache-to: type=gha,mode=max,scope=dev-backend-native-arm64
152+
cache-from: type=gha,scope=dev-backend-native-arm64-compat
153+
cache-to: type=gha,mode=max,scope=dev-backend-native-arm64-compat
173154

174155
create-backend-native-manifest:
175156
name: Create Backend Native Multi-Arch Manifest (dev)
@@ -188,4 +169,3 @@ jobs:
188169
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native \
189170
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-amd64 \
190171
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ env.DEV_VERSION }}-native-arm64
191-

0 commit comments

Comments
 (0)