Deploying to Fly.io

    Fly Setup

    1. Install flyctl

    2. Sign up and log in to Fly

      flyctl auth signup
    3. Setup Fly. It might ask if you want to deploy, say no since you haven't built the app yet.

    flyctl launch


    From your terminal:

    npm run dev

    This starts your app in development mode, rebuilding assets on file changes.


    If you've followed the setup instructions already, all you need to do is run this:

    npm run deploy

    Custom Domain

    Initially my domain was on Google Domains, but I moved it to SquareSpace. After migration I had to remove the default SquareSpace DNS records and add the Fly.io DNS records.

    I created certificates for VariantAlleles.com and www.VariantAlleles.com using the fly CLI.

    flyctl certs create [VariantAlleles.com](https://variantalleles.com)
    flyctl certs create [www.VariantAlleles.com](https://www.variantalleles.com)

    For www.VariantAlleles.comI added the following DNS records:

    A @ public-ip-address
    A @ IPV6-address

    For www.VariantAlleles.com I added the following DNS records:

    CNAME www FLYDEV-APP-NAME.fly.dev