- docker-compose.yml: db (timescaledb/pg17) + backend + frontend - backend/Dockerfile: multi-stage (golang:1.24-alpine -> debian:bookworm-slim) - frontend/Dockerfile: multi-stage (node:22-alpine -> nginx:alpine), Build-Args fuer VITE_* - frontend/nginx.conf: SPA-Routing + Asset-Caching - .env.example: BACKEND_HOST, DB_PASSWORD, JWT_SECRET, API_KEY - backend/config/config.go: ENV-Var-Support vervollstaendigt (JWT_SECRET, API_KEY, DB_PORT, DB_USER, DB_NAME) - backend/config.yaml.example: ENV-Var Kommentare ergaenzt - README: Docker-Quickstart als empfohlener Einstieg (3 Befehle) - .gitignore: .env zur ignore-Liste hinzugefuegt
22 lines
438 B
Nginx Configuration File
22 lines
438 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# SPA-Routing: alle Pfade auf index.html
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Caching fuer Assets
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Kein Caching fuer index.html
|
|
location = /index.html {
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
}
|