https://fly.io/docs/rails/getting-started/migrate-from-heroku/
$ fly launch
Setting secrets:
$ fly secrets set MAILGUN_API_KEY=12345
Get a list of secrets:
$ fly secrets list
$ fly deploy
$ fly certs create myapp.com
This will output the AAAA record value that you need to add to the DNS manager.
Make sure the system has the ALLOW_SEED
env var.
$ fly secrets set ALLOW_SEEDS=true
Then run the console command:
$ fly ssh console -C "app/bin/rails db:seed" -a myapp
Get the Redis servers
$ fly redis list
Get information, including connection URL:
$ fly redis status myapp-redis
Add the Redis URL env var:
$ fly secrets set REDIS_URL=<redis_url>
$ fly ssh console
$ cd app
$ bin/rails console
Get the scale of the current VMs:
$ fly scale show
Get the VM scale options:
$ fly platform vm-sizes
Changing the VM used:
$ fly scale vm dedicated-cpu-1x
Upgrading the VM memory:
$ fly scale memory 1024
Getting the scale status:
$ fly status
$ fly redis connect
FYI: Once a secret is added to your app in Fly, it is no longer accessible with the secrets command. To view the values you need to login to the server.
$ DATABASE_URL=<db-url> fly postgres connect -a <postgres-app-name>