set up a postgres database on a cloud vm, install docker to it, and link in the image

0

Hello, I have not used postrgres, vm, or docker before, but I would like to use this docker image to clone the api and host it on a cloud vm. Someone said I should set up a postgres database on a cloud vm, install docker to it, and link in the image. Can anyone tell me if this is the correct way to go here, and how exactly I can do that? I see web services and postgres databases as options on cloud providers but not sure if I need one or both or how to proceed here. Also how much gb minimum plan do I need to run this to test it? The code is from https://github.com/0xProject/0x-api#database and the image is here on dockerhub https://hub.docker.com/r/0xorg/0x-api Thanks for any insights or help with getting this running!!

posta un anno fa278 visualizzazioni
1 Risposta
0

Beware the 0x repository your mention is listed as deprecated and unsupported, so I would not trust or use that container in production systems. If you just want a proof of concept, it likely will work fine. When it comes to running containers, it really depends on your needs, and there are several options:

  • You can always spin anything up you want on an Amazon Elastic Compute Cloud (EC2) Instance and manage Docker 100% yourself.
  • Using Amazon Elastic Kubernetes Service (EKS) you can create tasks to run the container. (I don't recommend this for your first time with containers)
  • Using Elastic Container Services(ECS) you can create tasks (where you specify all the required ENV Variables)here and run them on AWS Fargate and are completely serverless. This is a great way to run a container, especially when you are researching options.
  • Using Amazon RDS you can spin up a dedicated Postgres instance that is managed and patched by AWS. This however will not run your API, but it will give you a stable and well-maintained postgres instance.
  • You could run postgres as a container if desired, but I would not recommend it.

As for sizing, I always start with small sizes first and test to see if I need to vertically scale the hardware this keeps costs as low as possible . With AWS you can vertically scale an instance quite easily. Using Fargate with ECS you can also specify the size of the Task, and I typically do the same things.

profile picture
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande