swap
This commit is contained in:
parent
1d69a72fed
commit
e3e3e198a4
3 changed files with 33 additions and 6 deletions
|
|
@ -171,14 +171,20 @@ jobs:
|
||||||
cd ~/mnemo_cards/tools/deploy
|
cd ~/mnemo_cards/tools/deploy
|
||||||
./generate-nginx-configs.sh
|
./generate-nginx-configs.sh
|
||||||
|
|
||||||
echo "📋 Deploying configurations locally..."
|
echo "🧹 Cleaning up old configuration files..."
|
||||||
cp generated_configs/*.conf /etc/nginx/sites-available/
|
# Remove old files without .conf extension that might cause conflicts
|
||||||
|
rm -f /etc/nginx/sites-available/forgejo
|
||||||
echo "🧹 Cleaning up old configurations..."
|
rm -f /etc/nginx/sites-available/vscode
|
||||||
|
rm -f /etc/nginx/sites-available/vscode.mnemo-cards.online
|
||||||
|
rm -f /etc/nginx/sites-available/mnemo_cards
|
||||||
|
rm -f /etc/nginx/sites-available/mnemo_cards_main
|
||||||
rm -f /etc/nginx/sites-enabled/vscode.mnemo-cards.online.conf
|
rm -f /etc/nginx/sites-enabled/vscode.mnemo-cards.online.conf
|
||||||
rm -f /etc/nginx/sites-enabled/code.mnemo-cards.online.conf
|
rm -f /etc/nginx/sites-enabled/code.mnemo-cards.online.conf
|
||||||
rm -f /etc/nginx/sites-enabled/mnemo-cards.online.conf
|
rm -f /etc/nginx/sites-enabled/mnemo-cards.online.conf
|
||||||
|
|
||||||
|
echo "📋 Deploying new configurations..."
|
||||||
|
cp generated_configs/*.conf /etc/nginx/sites-available/
|
||||||
|
|
||||||
echo "🔗 Creating symbolic links..."
|
echo "🔗 Creating symbolic links..."
|
||||||
ln -sf /etc/nginx/sites-available/mnemo-cards.online.conf /etc/nginx/sites-enabled/
|
ln -sf /etc/nginx/sites-available/mnemo-cards.online.conf /etc/nginx/sites-enabled/
|
||||||
ln -sf /etc/nginx/sites-available/code.mnemo-cards.online.conf /etc/nginx/sites-enabled/
|
ln -sf /etc/nginx/sites-available/code.mnemo-cards.online.conf /etc/nginx/sites-enabled/
|
||||||
|
|
@ -270,6 +276,27 @@ jobs:
|
||||||
git config --global http.maxRequestBuffer 100M
|
git config --global http.maxRequestBuffer 100M
|
||||||
git config --global core.compression 0
|
git config --global core.compression 0
|
||||||
|
|
||||||
|
- name: Setup Swap for Build
|
||||||
|
run: |
|
||||||
|
echo "💾 Setting up swap for Flutter build..."
|
||||||
|
# Install swap utilities if not available
|
||||||
|
apt-get update && apt-get install -y util-linux || true
|
||||||
|
# Check if swap already exists
|
||||||
|
if swapon --show 2>/dev/null | grep -q "/swapfile"; then
|
||||||
|
echo "✅ Swap already exists"
|
||||||
|
swapon --show || true
|
||||||
|
else
|
||||||
|
echo "📦 Creating 2GB swap file..."
|
||||||
|
# Create 2GB swap file (use dd as fallback if fallocate fails)
|
||||||
|
fallocate -l 2G /swapfile 2>/dev/null || dd if=/dev/zero of=/swapfile bs=1M count=2048 2>/dev/null
|
||||||
|
chmod 600 /swapfile
|
||||||
|
mkswap /swapfile
|
||||||
|
swapon /swapfile
|
||||||
|
echo "✅ Swap file created and activated"
|
||||||
|
swapon --show || true
|
||||||
|
fi
|
||||||
|
# Show current memory and swap status
|
||||||
|
free -h
|
||||||
|
|
||||||
- name: Build Web App
|
- name: Build Web App
|
||||||
working-directory: mnemo_cards_web_v2
|
working-directory: mnemo_cards_web_v2
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,6 @@ _flutter.buildConfig = {"engineRevision":"d3d45dcf251823c1769909cd43698d126db38d
|
||||||
|
|
||||||
_flutter.loader.load({
|
_flutter.loader.load({
|
||||||
serviceWorkerSettings: {
|
serviceWorkerSettings: {
|
||||||
serviceWorkerVersion: "1664190830"
|
serviceWorkerVersion: "1447658096"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ const MANIFEST = 'flutter-app-manifest';
|
||||||
const TEMP = 'flutter-temp-cache';
|
const TEMP = 'flutter-temp-cache';
|
||||||
const CACHE_NAME = 'flutter-app-cache';
|
const CACHE_NAME = 'flutter-app-cache';
|
||||||
|
|
||||||
const RESOURCES = {"flutter_bootstrap.js": "1016c5edf68382e5cd6bc30dc8abc968",
|
const RESOURCES = {"flutter_bootstrap.js": "d27e18c64dd0c621145dfce18b96c0a5",
|
||||||
"version.json": "28542ad255b8c0abed0b83ec843a2417",
|
"version.json": "28542ad255b8c0abed0b83ec843a2417",
|
||||||
"index.html": "bea65743d155de5b43dd38c2a02fa14d",
|
"index.html": "bea65743d155de5b43dd38c2a02fa14d",
|
||||||
"/": "bea65743d155de5b43dd38c2a02fa14d",
|
"/": "bea65743d155de5b43dd38c2a02fa14d",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue