Set default machine memory for apps during creation

fly launch creates and deploys a new app that you manage with our Fly Launch features (like a fly.toml file for config and deploying with fly deploy and scaling with fly scale).

Since you run fly create and then fly deploy I guess you have a fly.toml config file that you reuse for each new app?

Assuming you actually want to create a brand new app each time, instead of two commands, you could use fly launch to create and deploy in one step. You’ll have to tweak things and look up the options, but something like this would create and deploy a new app using an existing fly.toml file:

fly launch \
    --copy-config \
    --name $APP_NAME \
    --region $REGION \
    --org $ORG \
    --now \
    --image $IMAGE \
    --vm-memory $MEMORY

I’m not sure if right now you have different actions for create and deploy, but you can re-deploy the same app with fly deploy. As long as the app hasn’t been scaled down to zero, the memory settings are retained for the Machines.