I want to move my. Net core + angular + sql server to Linux docker centos

I currently have a site on azure in an app service container, live with a custom domain and ssl cert. I went with azure because I had free msdn credits at my old job but not anymore. The cost is ridiculous.

The app comprises of:

  • .net core api

  • angular 7 front end

  • sql server

So far on my win 10 machine I've been able to create 2 docker containers targeting Linux 1 for sql server, andone for the api. I'm still using ng serve or iis to host the angular app. So far this works. Next I need to dockerise the angular app. But then orchestrate them perhaps with a yaml file to compose them.

Few questions:

  • should I have a docker container for each 3 components or can I get away with one? I think sql should be on its own because I don't want to lose data. That's my guess

  • I want to target centos as that's what we are planning to use to host. Net core at my work. Or does the Linux distro not matter? I.e. Just go with the bear bones distros that are provided in tutorials.

  • I will need nginx, if angular and the api need two different containers do I need nginx on both?

  • if I need multi containers does anyone have a good tutorial on using a yml compose file for what I want to do? There is so much information out there. Not sure what is best practice as I'm new to docker and its a lot more complicated than I expected!

  • what's a good cheap provider for docker? I was looking at aws and digital ocean.

Thanks!

submitted by /u/Neophyte-
[link] [comments]
Source: Reddit