Help with Deploying APIs to FLY server

Hey All. I want to test out fly.io, I want to finally deploy backend APIs to fly.io

I have some issues though, fly.io doesn’t currently support GUI for setting up CNAME and setting a sud-domain and the rest easily. I want to deploy more than 5 APIS ( different services ). I want to create 2 subdomains, one for staging, the other for production. I need some help with setting that up. How do I create a subdomain, and deploy or push codes from GitHub to one of the subdomains.

I just need a way to easily connect my domain to fly, create a subdomain, and create 2 servers ( testing, production)

Any suggestions would be appreciated.

There are a couple pieces here:

For the deploy from GitHub, you can use the example here to deploy using GitHub actions: Continuous Deployment with Fly.io and GitHub Actions · Fly Docs

Now, you will want to have a different app for each environment (staging, prod, dev, etc). For each app, just use the “certificates” section and specify the subdomain you want. So if you want prod, make it “prod.domain.tld”. Hopefully that helps and I didn’t completely misunderstand the question lol

Hiya! Thanks for the respons, @atridad

I found the docs for setting up CI/CD to be useful, just that i need a way to connect upto 5 github repo to the same fly.io’s server.

As for the servers, I want two. One for staging/development, the other for live/production.

So, the thing is, how do I easily create the sub domain ( for the two servers), and and configure the CI/CD to both servers.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.