Skip to content

Instantly share code, notes, and snippets.

@DiegoFleitas
Created March 26, 2023 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiegoFleitas/9b4cfbebe68674b19592ab8a6778a099 to your computer and use it in GitHub Desktop.
Save DiegoFleitas/9b4cfbebe68674b19592ab8a6778a099 to your computer and use it in GitHub Desktop.
scale down all fly.io apps
for /f "tokens=1,3" %%a in ('flyctl apps list ^| findstr /C:"running"') do (
if "%%b"=="running" (
echo Scaling down %%a
flyctl scale count 0 -a %%a
)
)
pause
@DiegoFleitas
Copy link
Author

DiegoFleitas commented Mar 26, 2023

scale up

for /f "tokens=1,3" %%a in ('flyctl apps list ^| findstr /C:"dead"') do (
  if "%%b"=="dead" (
    echo Scaling up %%a
    flyctl scale count 1 -a %%a
  )
)

pause

@DiegoFleitas
Copy link
Author

(peak end of the month scripting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment