server fixes
This commit is contained in:
@@ -46,7 +46,7 @@ sudo mysql -u root -p
|
||||
|
||||
# In MySQL Shell:
|
||||
CREATE DATABASE IF NOT EXISTS crumbforest CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE USER IF NOT EXISTS 'crumb_prod'@'localhost' IDENTIFIED BY 'SICHERES_PASSWORT';
|
||||
CREATE USER IF NOT EXISTS 'crumb_prod'@'localhost' IDENTIFIED BY 'codexkruemel2025!';
|
||||
GRANT ALL PRIVILEGES ON crumbforest.* TO 'crumb_prod'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
EXIT;
|
||||
|
||||
@@ -154,11 +154,29 @@ cp -r "$PROJECT_ROOT/app"/* "$INSTALL_DIR/app/"
|
||||
print_success "App Code kopiert"
|
||||
|
||||
print_info "Kopiere Dokumentation..."
|
||||
if [ -d "$PROJECT_ROOT/docs" ]; then
|
||||
cp -r "$PROJECT_ROOT/docs"/* "$INSTALL_DIR/docs/" || true
|
||||
print_success "Docs kopiert"
|
||||
# Check for docs_git (preferred source) or docs
|
||||
DOCS_SOURCE=""
|
||||
if [ -d "$PROJECT_ROOT/docs_git" ]; then
|
||||
DOCS_SOURCE="$PROJECT_ROOT/docs_git"
|
||||
print_info "Nutze docs_git als Quelle"
|
||||
elif [ -d "$PROJECT_ROOT/docs" ]; then
|
||||
DOCS_SOURCE="$PROJECT_ROOT/docs"
|
||||
print_info "Nutze docs als Quelle"
|
||||
fi
|
||||
|
||||
if [ -n "$DOCS_SOURCE" ]; then
|
||||
cp -r "$DOCS_SOURCE"/* "$INSTALL_DIR/docs/" || true
|
||||
|
||||
# Fix: Create symlink in app/docs so hardcoded paths work (mimics Docker volume)
|
||||
if [ ! -L "$INSTALL_DIR/app/docs" ]; then
|
||||
# Remove empty dir if it exists
|
||||
if [ -d "$INSTALL_DIR/app/docs" ]; then rmdir "$INSTALL_DIR/app/docs" 2>/dev/null || true; fi
|
||||
ln -sf "$INSTALL_DIR/docs" "$INSTALL_DIR/app/docs"
|
||||
print_success "Docs Symlink erstellt (app/docs -> ../docs)"
|
||||
fi
|
||||
print_success "Docs kopiert von $(basename "$DOCS_SOURCE")"
|
||||
else
|
||||
print_warning "Docs Verzeichnis nicht gefunden"
|
||||
print_warning "Kein Dokumentations-Verzeichnis (docs_git oder docs) gefunden"
|
||||
fi
|
||||
|
||||
print_info "Kopiere Root Dokumentation..."
|
||||
@@ -225,6 +243,13 @@ chmod 750 "$INSTALL_DIR/app"
|
||||
chmod 600 "$INSTALL_DIR/.env" # Sensitive data!
|
||||
chmod -R 755 "$INSTALL_DIR/app/static" 2>/dev/null || true
|
||||
|
||||
# Fix: Symlink .env to app directory for Pydantic Settings
|
||||
if [ ! -L "$INSTALL_DIR/app/.env" ]; then
|
||||
print_info "Erstelle Symlink für .env in App-Verzeichnis..."
|
||||
ln -sf "$INSTALL_DIR/.env" "$INSTALL_DIR/app/.env"
|
||||
fi
|
||||
chown -h $APP_USER:$APP_GROUP "$INSTALL_DIR/app/.env"
|
||||
|
||||
print_success "Permissions gesetzt"
|
||||
|
||||
echo ""
|
||||
|
||||
@@ -97,8 +97,12 @@ if [ -f "$PROJECT_ROOT/crumbforest_config.json" ]; then
|
||||
fi
|
||||
|
||||
# Update docs if needed
|
||||
if [ -d "$PROJECT_ROOT/docs" ]; then
|
||||
print_info "Aktualisiere Dokumentation..."
|
||||
if [ -d "$PROJECT_ROOT/docs_git" ]; then
|
||||
print_info "Aktualisiere Dokumentation aus docs_git..."
|
||||
cp -r "$PROJECT_ROOT/docs_git"/* "$INSTALL_DIR/docs/" 2>/dev/null || true
|
||||
print_success "Docs aktualisiert"
|
||||
elif [ -d "$PROJECT_ROOT/docs" ]; then
|
||||
print_info "Aktualisiere Dokumentation aus docs..."
|
||||
cp -r "$PROJECT_ROOT/docs"/* "$INSTALL_DIR/docs/" 2>/dev/null || true
|
||||
print_success "Docs aktualisiert"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user