C
C#4mo ago
Mihneas22

Hosting an API

Hello! I want to host my API to the web but I don't rlly know what service to use. I have an ASP.NET Core API, Clean Arhitecture with a local SQL Server Database. What would be the best method to get it on the web along with the database? Thanks!
24 Replies
Keswiik
Keswiik4mo ago
find any hosting provider that lets you use your own docker images / containers, hosting at that point would be trivial
Mihneas22
Mihneas22OP4mo ago
so I should first dockarize everything? i don't have any experience with this whatsoever and this is why I'm asking
Keswiik
Keswiik4mo ago
it's what i would do, putting asp.net / .net core stuff into a container is pretty simple
Mihneas22
Mihneas22OP4mo ago
Yeah... :harold: Could you recommend any docs? Also with the database? Like the ASP.NET Core API plus database all in one container
Keswiik
Keswiik4mo ago
that's not how you use docker sql server will have public containers available, use those
Mihneas22
Mihneas22OP4mo ago
Are they free?
Keswiik
Keswiik4mo ago
yes
Mihneas22
Mihneas22OP4mo ago
Okay so for sql server, public containers
Keswiik
Keswiik4mo ago
and for your asp.net stuff just google it should be a ton of resources on how to do it plus looking at the docker documentation when needed
Mihneas22
Mihneas22OP4mo ago
i see and after I dockerize
Keswiik
Keswiik4mo ago
then you find a hosting provider that you can run them on or you look at hosting providers first, some will have stuff built in to host databases without docker / virtualization
Mihneas22
Mihneas22OP4mo ago
Like heroku? Or Azure
Keswiik
Keswiik4mo ago
not sure what heroku offers, haven't used them in a decade or so
Mihneas22
Mihneas22OP4mo ago
i see
Keswiik
Keswiik4mo ago
but ya, azure should have managed database options
Mihneas22
Mihneas22OP4mo ago
what are you using if I may ask?
Keswiik
Keswiik4mo ago
i don't publicly host any of my personal stuff it's all self-hosted in my own server rack at work we use oracle
Mihneas22
Mihneas22OP4mo ago
i see very cool thank you a lot for your help
@yoajdin
@yoajdin4mo ago
I'd like to add you don't need to dockerize. IE it's not mandatory. I've deployed API's to Azure with success without having to use Docker. I would look more so at pricing. Hosting .NET can get expensive if you plan to host it 24/7. Check out pricing and see what your options are.
Mihneas22
Mihneas22OP4mo ago
:Ok:
Pobiega
Pobiega4mo ago
The standard recommendation is to get a cheap VPS as your first hosting solution $vps
@yoajdin
@yoajdin4mo ago
Damn that's a good bot. Agreed. Shit gets expensive fast If you decide 5 years from now to containerize you can switch. IE it's not set in stone type of stuff. Docker is a good tool and skill to have though
Pobiega
Pobiega4mo ago
I would go so far as consider knowing how containers work and how to containerize an app fundamental, much like git

Did you find this page helpful?