Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.87 KB

cloud.md

File metadata and controls

41 lines (28 loc) · 1.87 KB

Running the Server in the Cloud

This is the recommended method to run the server in the cloud. For example, you might use this method if you're running it in production.

Installation

  1. Sign up for a Grafana Cloud account if you'd like to observe the system using Grafana Cloud.

  2. Edit Grafana Agent's configuration if required.

  3. Set up PostgreSQL 14.4. For example, GCP SQL, AWS RDS. It's recommended to allocate 0.25 vCPU, 0.5 GB of memory, and 5 GB of storage.

  4. Set up RabbitMQ 3.11, and install the RabbitMQ Delayed Message Plugin. For example, Stackhero for RabbitMQ. It's recommended to allocate 0.25 vCPU, 2.5 GB of memory, and 1 GB of storage.

  5. Set up the server:

    1. Clone the repo using one of the following methods:

      • SSH:

        git clone git@github.com:neelkamath/node-js-template.git
      • HTTPS:

        git clone https://github.com/neelkamath/node-js-template.git
    2. Change the directory:

      cd node-js-template
    3. Build the Docker image:

      docker build -f docker/node-js-template/Dockerfile .
    4. Run the Docker image on port 3,000 (this can be overridden using the PORT environment variable). For example, GCP Run, AWS Fargate. It's recommended to allocate 2 vCPU, and 4 GiB of memory. Any number of instances can be run.

    5. Set the environment variables.

    6. Connect to PostgreSQL and RabbitMQ.