Remove nginx/webapp container; single Go server serves SPA + API

- Add root Dockerfile: node build → copy dist into Go embed path → distroless binary
- Update docker-compose: one service (api on :9050), DB renamed ralph→pamietnik
- Remove references to RALPH/reisejournal across all docs and configs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-04-06 10:32:04 +02:00
parent d1436abca8
commit a49416854e
28 changed files with 87 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
# Pamietnik Webapp
Eigenständige Single-Page-Application für das Pamietnik-Reisejournal. Kommuniziert über REST mit dem Go-Backend.
Eigenständige Single-Page-Application für das Pamietnik. Kommuniziert über REST mit dem Go-Backend.
## Technologie

View File

@@ -2,6 +2,16 @@ server {
listen 80;
# API und Auth-Endpunkte zum Backend proxieren
location /healthz {
proxy_pass http://api:8080;
proxy_set_header Host $host;
}
location /readyz {
proxy_pass http://api:8080;
proxy_set_header Host $host;
}
location /v1/ {
proxy_pass http://api:8080;
proxy_set_header Host $host;

View File

@@ -50,9 +50,15 @@ async function get<T>(path: string): Promise<T> {
export const api = {
getDays(from?: string, to?: string): Promise<DaySummary[]> {
const params = new URLSearchParams()
if (from) params.set('from', from)
if (to) params.set('to', to)
const now = new Date()
const defaultTo = now.toISOString().slice(0, 10)
const past = new Date(now)
past.setDate(past.getDate() - 90)
const defaultFrom = past.toISOString().slice(0, 10)
const params = new URLSearchParams({
from: from ?? defaultFrom,
to: to ?? defaultTo,
})
return get<DaySummary[]>(`/v1/days?${params}`)
},
getTrackpoints(date: string): Promise<Trackpoint[]> {