Umbenennung in Vorrania vollstaendig durchziehen
Auf ausdruecklichen Wunsch jetzt auch die internen Bezeichner, weil die Installation noch keine echten Daten enthaelt: POSTGRES_USER/PASSWORD/DB, der Volume-Name, die Standard-DATABASE_URL, der localStorage-Schluessel und die iOS-Zeichenketten inklusive Keychain-Konto. Das setzt eine leere Datenbank voraus: Der neue Volume-Name legt eine neue, leere Datenbank an. Die alte bleibt als verwaistes Volume liegen und muss von Hand entfernt werden. Die Warnung in docker-compose.yml bleibt stehen, damit eine spaetere Umbenennung nicht versehentlich mit Daten im Volume passiert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
|
||||
# Database
|
||||
database_url: str = "postgresql+psycopg2://project_good:project_good@localhost:5432/project_good"
|
||||
database_url: str = "postgresql+psycopg2://vorrania:vorrania@localhost:5432/vorrania"
|
||||
|
||||
# Auth / JWT
|
||||
jwt_secret: str = "change-me-in-production"
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
WEB_PORT=8080
|
||||
|
||||
# Datenbank
|
||||
POSTGRES_USER=project_good
|
||||
POSTGRES_PASSWORD=project_good
|
||||
POSTGRES_DB=project_good
|
||||
POSTGRES_USER=vorrania
|
||||
POSTGRES_PASSWORD=vorrania
|
||||
POSTGRES_DB=vorrania
|
||||
|
||||
# Sicherheit – im Betrieb unbedingt ändern!
|
||||
JWT_SECRET=change-me-please
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
# Die Datenbank-Bezeichner heissen weiterhin "project_good" und werden mit der
|
||||
# Umbenennung in Vorrania bewusst NICHT geaendert: Ein anderer Volume-Name legt
|
||||
# eine leere Datenbank an, und ein anderer POSTGRES_USER scheitert an einem
|
||||
# bestehenden Volume. Beides wuerde vorhandene Bestaende unbrauchbar machen.
|
||||
# Es sind interne Namen, die niemand zu sehen bekommt.
|
||||
# Achtung bei kuenftigen Aenderungen an POSTGRES_USER/DB oder dem Volume-Namen:
|
||||
# Ein anderer Volume-Name legt eine leere Datenbank an, ein anderer Benutzername
|
||||
# scheitert an einem bereits eingerichteten Volume. Solche Umbenennungen gehen
|
||||
# nur zusammen mit einem Datenumzug - oder auf einer leeren Installation.
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-project_good}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-project_good}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-project_good}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-vorrania}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-vorrania}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vorrania}
|
||||
volumes:
|
||||
- project_good_db:/var/lib/postgresql/data
|
||||
- vorrania_db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-project_good}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vorrania}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
@@ -26,7 +25,7 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: postgresql+psycopg2://${POSTGRES_USER:-project_good}:${POSTGRES_PASSWORD:-project_good}@db:5432/${POSTGRES_DB:-project_good}
|
||||
DATABASE_URL: postgresql+psycopg2://${POSTGRES_USER:-vorrania}:${POSTGRES_PASSWORD:-vorrania}@db:5432/${POSTGRES_DB:-vorrania}
|
||||
JWT_SECRET: ${JWT_SECRET:-change-me}
|
||||
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-changeme}
|
||||
@@ -43,4 +42,4 @@ services:
|
||||
- "${WEB_PORT:-8080}:80"
|
||||
|
||||
volumes:
|
||||
project_good_db:
|
||||
vorrania_db:
|
||||
|
||||
@@ -120,9 +120,9 @@ ensure_example() {
|
||||
WEB_PORT=8080
|
||||
|
||||
# Datenbank
|
||||
POSTGRES_USER=project_good
|
||||
POSTGRES_PASSWORD=project_good
|
||||
POSTGRES_DB=project_good
|
||||
POSTGRES_USER=vorrania
|
||||
POSTGRES_PASSWORD=vorrania
|
||||
POSTGRES_DB=vorrania
|
||||
|
||||
# Sicherheit – im Betrieb unbedingt ändern!
|
||||
JWT_SECRET=change-me-please
|
||||
@@ -172,9 +172,9 @@ create_env() {
|
||||
|
||||
cat > "$ENV_FILE" <<EOF
|
||||
WEB_PORT=$web_port
|
||||
POSTGRES_USER=project_good
|
||||
POSTGRES_USER=vorrania
|
||||
POSTGRES_PASSWORD=$(rand 24)
|
||||
POSTGRES_DB=project_good
|
||||
POSTGRES_DB=vorrania
|
||||
JWT_SECRET=$(rand 48)
|
||||
ADMIN_USERNAME=$admin_user
|
||||
ADMIN_PASSWORD=$admin_pass
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Project-Good – iOS-App
|
||||
# Vorrania – iOS-App
|
||||
|
||||
Native SwiftUI-App zum Ein- und Auslagern per Barcode-Scan. Sie spricht dieselbe
|
||||
REST-API wie die Web-Oberfläche.
|
||||
|
||||
@@ -14,7 +14,7 @@ enum APIError: LocalizedError {
|
||||
}
|
||||
}
|
||||
|
||||
/// Schlanker Client für die Project-Good-REST-API.
|
||||
/// Schlanker Client für die Vorrania-REST-API.
|
||||
/// Alle Pfade laufen über /api (wie im Web, siehe web/nginx.conf).
|
||||
actor APIClient {
|
||||
static let shared = APIClient()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Project-Good</string>
|
||||
<string>Vorrania</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -40,7 +40,7 @@ struct LoginView: View {
|
||||
.disabled(busy || server.isEmpty || username.isEmpty)
|
||||
}
|
||||
}
|
||||
.navigationTitle("Project-Good")
|
||||
.navigationTitle("Vorrania")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ struct HomeView: View {
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
.navigationTitle("Project-Good")
|
||||
.navigationTitle("Vorrania")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
Menu {
|
||||
|
||||
@@ -9,7 +9,7 @@ final class Session: ObservableObject {
|
||||
private let urlKey = "server_url"
|
||||
private let usernameKey = "username"
|
||||
private let stayKey = "stay_logged_in"
|
||||
private let keychainAccount = "project-good-token"
|
||||
private let keychainAccount = "vorrania-token"
|
||||
|
||||
@Published private(set) var baseURL: URL?
|
||||
@Published private(set) var token: String?
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
const API_BASE = "/api";
|
||||
|
||||
// Schluessel bleibt trotz Umbenennung in Vorrania: Ein neuer Name wuerde alle
|
||||
// angemeldeten Browser einmal aussperren, ohne dass irgendjemand ihn je sieht.
|
||||
const TOKEN_KEY = "project_good_token";
|
||||
// Wird dieser Schluessel je wieder umbenannt, sind alle offenen Sitzungen
|
||||
// ungueltig - die Anmeldung liegt im localStorage des Browsers.
|
||||
const TOKEN_KEY = "vorrania_token";
|
||||
|
||||
export function getToken() {
|
||||
return localStorage.getItem(TOKEN_KEY);
|
||||
|
||||
Reference in New Issue
Block a user