diff --git a/mnemo_cards_web_v2/.gitignore b/mnemo_cards_web_v2/.gitignore index 3820a95..886f190 100644 --- a/mnemo_cards_web_v2/.gitignore +++ b/mnemo_cards_web_v2/.gitignore @@ -30,7 +30,6 @@ migrate_working_dir/ .flutter-plugins-dependencies .pub-cache/ .pub/ -/build/ /coverage/ # Symbolication related diff --git a/tools/deploy/web-app/config.sh b/tools/deploy/web-app/config.sh index a2dc95f..a769a6d 100644 --- a/tools/deploy/web-app/config.sh +++ b/tools/deploy/web-app/config.sh @@ -171,10 +171,9 @@ check_build_directory() { # Function to build Flutter web app for production build_flutter_app() { print_status "Building Flutter web app for production..." - # Use -O2 optimization and disable wasm to reduce memory usage during compilation flutter build $FLUTTER_BUILD_TARGET $FLUTTER_BUILD_MODE \ --dart-define=API_BASE_URL=$API_BASE_URL \ - --dart2js-optimization=O2 + --dart2js-optimization=O4 if [ $? -ne 0 ]; then print_error "Flutter build failed" diff --git a/tools/deploy/web-app/deploy.sh b/tools/deploy/web-app/deploy.sh index 026126a..e23cc07 100755 --- a/tools/deploy/web-app/deploy.sh +++ b/tools/deploy/web-app/deploy.sh @@ -30,23 +30,6 @@ print_status "Deploying on server..." ssh "$SERVER_USER@$SERVER_IP" << EOF set -e - # Setup swap if needed (helps with memory-intensive operations) - $(declare -f setup_swap) - $(declare -f remove_swap) - $(declare -f print_status) - $(declare -f print_warning) - $(declare -f print_success) - $(declare -f print_info) - RED='$RED' - GREEN='$GREEN' - YELLOW='$YELLOW' - BLUE='$BLUE' - NC='$NC' - setup_swap - - # Trap to ensure swap cleanup on exit - trap 'remove_swap' EXIT - # Create web directory if it doesn't exist mkdir -p $WEB_ROOT @@ -115,9 +98,6 @@ ssh "$SERVER_USER@$SERVER_IP" << EOF ufw allow $FIREWALL_ALLOW_SSH ufw --force enable - # Clean up temporary swap - remove_swap - echo "Deployment completed successfully!" echo "Application is available at: https://memo-cards.online" EOF