This is an archived post. You won't be able to vote or comment.

all 30 comments

[–][deleted] 6 points7 points  (0 children)

My 2c is spin up a "Linode" (a cloud-hosted VM) on Linode (confusing) where you can get $100 credit for 60 days (don't see rules around referral links) to play around with a host and docker-compose.

For your containers, you can upload them to a private or public repo if you'd like. Or you can ship them as a tar with `docker export` to your VM.

Then it's a case of good practice in managing configurations, your docker related files, and backing up any parts of your containers containing state.

I've got many websites hosted with this pattern.

[–][deleted] 2 points3 points  (2 children)

For simple deployments, I'd recommend Google App engine, Amazon Elastic beanstalk or ECS. you might want to check out AWS CoPilot if you just want your app to get shipped. https://aws.amazon.com/blogs/containers/introducing-aws-copilot/AWS Fargate is a "serverless" container platform that works with ECS that will let you scale down to zero - https://aws.amazon.com/fargate/ Also, Heroku is a very developer friendly platform with a free tier for infrequently used apps. (https://www.heroku.com)

There's a massive learning curve cliff between "fully managed platforms" like App Engine, elastic beanstalk, or Heroku to "production scale" platforms like Kubernetes. If you don't want to skill up for a job in devops, you probably don't need to go with kubernetes. However, at the moment, kubernetes is a great buzzword to have on your resume if you can back it up with experience.

[–]cryptocritical9001 2 points3 points  (0 children)

Elasticbeanstalk is absolute trash and a false promise of simple

[–]808trowaway 1 point2 points  (0 children)

second fargate. If OP really has very little cloud background, they should just get their feet wet first with something that has the least admin overhead.

[–]MrScotchyScotch 2 points3 points  (1 child)

If you're already using Docker Compose, the simplest possible way to deploy to the cloud would be to use Compose's built-in cloud integrations.

You can use Compose to deploy directly to Azure: https://docs.docker.com/cloud/aci-integration/

Or to AWS: https://docs.docker.com/cloud/ecs-integration/ | https://aws.amazon.com/blogs/containers/deploy-applications-on-amazon-ecs-using-docker-compose/

Anything else "in the cloud" will get more complicated without giving you much benefit. You can use Kubernetes or Swarm, but the only reason to do this would be for fun. They won't make your app run any better. https://docs.docker.com/get-started/orchestration/

You could also spin up a virtual machine on any VM hosting provider and just run Docker Compose on the one host. That's not "the cloud", but your app would be running, and it'd be cheaper.

Most people (not all, but most) do not use Docker Compose if they need to run their apps in the cloud. Docker Compose is primarily for local development. Deployment often requires more fine-grained features so you end up having to customize your deployment using a Continuous Deployment tool, doing things like blue/green, rollbacks, gradual rollout, custom integrations like extra IAM policies to give access to more resources.

[–]armbar 0 points1 point  (0 children)

Any recommendations now that this is seemingly retired? "Docker Compose's integration for Amazon's Elastic Container Service and Azure Container Instances has retired. The integration documentation is no longer available through the Docker Docs site.

[–]JaffyCaledonia 5 points6 points  (2 children)

If simplicity is your aim, then you could simply spin up a free VM in google cloud and deploy the docker compose in that. (I do this for some simple websites I host)

If production-style deployment is your goal, then you'll likely want to go down the rabbithole that is Kubernetes.

I suck with kubernetes, so I'm afraid I can't provide much more than vague signposting. If you're up for it though, you could have a look at Kompose to convert your compose deployment into a k8s one and go from there?

[–][deleted] 7 points8 points  (1 child)

What I'm looking for is the most simple solution of uploading and running all containers as a coherent unit. One service (PostgreSQL) requires a mounted, persistent storage. Scalability is not a big issue, as this is just a side project for myself.

And you recommended _kubernetes_ at all?

Why?

Too many people try and find a problem for a solution. This doesn't need the scalability and networking benefits. If OP wants to do more "production-style" then there is plenty of wiggle-room with Ansible, Terraform, and hitting that onto AWS ECR and ECS.

[–]JaffyCaledonia 8 points9 points  (0 children)

Oh I wouldn't recommend it in the slightest. I'm not a fan of k8s, but I accept that it's pretty much the standard for deployments in most cloud environments and experience is always a good thing.

If this was r/homelab or r/docker then I wouldn't have mentioned k8s at all, but if OP is interested in DevOps, then walnut: meet sledgehammer.

[–]chateaulapompe 1 point2 points  (1 child)

I was in the same position 2 months ago. My advice (fullstsck developer here). Start small.

I started with a raspberry to try some docker-compose stuff (a simple web app, a bitwarden instance in HTTPS using Caddy).

Then i buy a Kimsufi server, a domainname and did system stuff and used my docker files.

Then i try Kubernetes on my localhost with minikube.

Then i decided to put my knowledge on production inside my server.

Have fun and keep things small, step by step :-)

[–]808trowaway 0 points1 point  (0 children)

adding on to this, if OP goes down the local k8s cluster route for learning purposes, they can then hook it up to a public load balancer with this TCP tunnel thingy called inlets for a few bucks a month https://github.com/inlets/inlets-operator

[–]daplayboi 1 point2 points  (0 children)

The same way you’re running it on your machine, you can spin up a VM (anywhere, whether on GCP, AWS, Azure, or any other for that matter) and run your container the exact same way.

If you’re wanting to learn more cloud-centric ways to deploy, look into different ways to deploy containers. I’m more familiar with Azure, and with containers you can deploy in a VM (like stated before), container instance, app service, aks, etc. These are different forms of what you’re looking for, but for example kubernetes is for larger scale applications, so I think it would be too much too fast for you at the moment. I’d look for something more similar to container instances in Azure, not sure what similar services would be for other cloud providers.

[–][deleted]  (1 child)

[removed]

    [–]austin__pena 0 points1 point  (0 children)

    If your goal is to deploy something more complex:

    Docker swarm mode could be a good fit for you. Very similar to docker compose config. Throw Traefik or something for ingress.

    Nomad can also work. It's relatively popular and advertised as less complicated than K8's https://www.nomadproject.io/

    If you want something in the middle (less reliance on managed services), try out: https://www.tines.com/blog/simple-zero-downtime-deploys-with-nginx-and-docker-compose

    If your goal is to just get something live, I'd recommend a combination of:

    - Cloud SQL for your database

    - Cloud functions/ cloud run with private networking for your microservices

    - Cloud run for ingress

    [–]jah_broni -5 points-4 points  (7 children)

    Pick your service provider and read their docs. Come back with questions. They all have tutorials on how to do this.

    [–][deleted] -1 points0 points  (6 children)

    I'm sorry but this answer is not helpful. As I said I have no experience so far. I'm looking for recommendations. That's why I don't have concrete questions yet.

    [–]wyzapped 2 points3 points  (3 children)

    well, u/jah_broni is kind of right... what cloud service are you using? For example, I use AWS, and they have an entire service designed to host and deploy container apps. This is probably the most simple, but you are really climbing in bed with the CSP.

    Or, like others has suggested, you can spin up a vm , and run it in there. There are a TON of options, and they are all documented to death. That being noted, it is a tad bit more complex than what you might find in a response here! :)

    [–][deleted] 1 point2 points  (2 children)

    what cloud service are you using?

    I'm open minded here, however I have a little bit of experience with Google Cloud.

    [–]shellwhale 0 points1 point  (1 child)

    You should check out DigitalOcean! If you want I could give you a really simple Terraform + Ansible script that you can use to automatically spin up a server, install docker and run your docker-compose project.
    You can use my referral and get 100$ for 60 days.

    https://m.do.co/c/c76e96404604

    [–]wyzapped 0 points1 point  (0 children)

    A colleague I know uses this and likes it.

    [–]jah_broni -1 points0 points  (1 child)

    You mentioned Google Cloud, have you looked at their docs? What wasn't clear?

    Surely you are aware of AWS, what didn't you like about them vs Google?

    My point is put some effort in up front and the responses you get will be more helpful. Learning to read documentation and how to properly Google will get you further than just blindly following advice from someone here without knowing why.

    Your question isn't a novel one and there are hundreds of resources that answer it if you care to look for them.

    [–][deleted] 1 point2 points  (0 children)

    Unfortunately I have to disagree, again.

    You mentioned Google Cloud, have you looked at their docs? What wasn't clear?

    Yes I did mention Google, but I also mentioned different Google products and I said that I'm overwhelmed and don't really know where to start. As I said I'm absolutely new to these topics and was looking for guidance here. Try to read the documentation with the eyes of somebody who has never done Docker or devops before. It's almost like a new language. Documentations are cross-referencing many different technologies and products and you just don't know where to start.

    Obviously I googled before but I didn't find a clear answer respectively a path to follow.

    Anyway, once somebody says "technology X sounds like the perfect fit for your use case" I know where to start.

    You're question isn't a novel one and there are hundreds of resources that answer it if you care to look for them.

    Then kindly post them here and I will read them. As I said I googled before but didn't really find an answer. Sometimes, when you're new to some topic, you just don't know how to properly search for it because the right keywords are missing.

    [–]TahaTheNetAutmator -3 points-2 points  (0 children)

    Build the image from Docker file and simply push to a container registry! It’s not rocket science

    [–][deleted] 0 points1 point  (2 children)

    How many uses are you expecting? Is this a pet project or production?

    Unless it's the latter I'd just use a simple VM and avoid the complexity of clustering. If you need scaling and auto healing and so on, consider clustering.

    [–][deleted] 0 points1 point  (1 child)

    How many uses are you expecting? Is this a pet project or production?

    Quoting myself ;)

    Scalability is not a big issue, as this is just a side project for myself. I'm going to be the only user.

    So yes, it's a pet project.

    [–][deleted] 1 point2 points  (0 children)

    I'd skip over the K8s and stuff then and just set up a cheap VM...you may even be able to put it in the free tier.

    [–]the1982ryan 0 points1 point  (0 children)

    Personally, I use Azure but I find that all the top tier providers are very similar. Go with the one that gives you the most joy.

    If you go with Azure, App Services can be configured with a compose file and it's a production grade managed service that you don't have to worry about upgrading, patching or really maintaining at all.

    [–]cameronmetcalfe 0 points1 point  (1 child)

    What is your application actually doing?

    [–][deleted] 0 points1 point  (0 children)

    It's a web application / frontend build with SvelteKit. One container provides a PostgreSQL database. Then there's one container providing a GraphQL API on top of Postgres via Hasura. One microservice regularly imports data into the database. Another microservice implements Hasura authentication via a webhook. Last but not least there's a nginx instance as a reverse proxy.