https://kotlinlang.org logo
#ktor
Title
# ktor
c

Cheenu Soni

02/01/2021, 3:46 AM
Where do I deploy my REST APIs in Ktor? Google cloud has so many hidden charges and its very confusing, and Heroku gets expensive rapidly as we scale. Are there any other options? Thanks.
b

Big Chungus

02/01/2021, 5:43 AM
Azure app service has a generous free tier
I have this running entirely free. Azure app service for ktor api Azure static web apps for my frontend Freenom.tk for a free domain Cloudflare free accound for dns Uptimerobot.com for pinging every 5mins to keep app service alive 24/7 Azure cosmosdb as mongodb database
❤️ 1
Oh and artifactory for terraform state storage
Another nice thing about the setup is that I haven't had to add my credit card anywhere!
a

andylamax

02/01/2021, 6:07 AM
@Arkangel you should look at this thread
👍 1
j

Julien Salvi

02/01/2021, 7:45 AM
You should look at Dokku easy configuration and looks very good : https://dev.to/kotlin/deploying-server-side-kotlin-ktor-applications-on-dokku-1iee
🙌 1
c

Cheenu Soni

02/01/2021, 8:02 AM
Thanks for so many options 🙌 . I have been stuck on this issue for days. I will try all the options.
Is there some article or other resource for using Ktor with Azure App Services @Big Chungus? I am new to backend development with Ktor and Azure both.
b

Big Chungus

02/01/2021, 10:13 AM
You can ignore the fact that you;re using "KTOR" and "AppService" combination, they have nothing to do with each other directly.
ktor app in the end is plain java app
Or I should say jvm app. In any case, these steps worked well for me so far: 1. Pack your ktor app into "fatJar" (self-contained jar) 2. Dockerise that jar and publish it to some docker repo 3. Tell AppService which docker image to use and where to get it (I've done it via terraform, but you can do it via Azure webUI too) Hope that'll be enough to get you started. There's also Official Azure Docs if you want to dive there. In general, I think kamp covers most of the use-cases for a web-app, so just browse there for examples 🙂
👀 1
118 Views