threefoldtech / freeflow_caprover

Apache License 2.0
1 stars 0 forks source link

freeflow_caprover

What is CapRover?

CapRover is an easy-to-use app/database deployment and web server manager that works for a variety of applications such as Node.js, Ruby, PHP, Postgres, and MongoDB. It runs fast and is very robust, as it uses Docker, Nginx, LetsEncrypt, and NetData under the hood behind its user-friendly interface. Here’s a link to CapRover's open source repository on GitHub

Features of Caprover:

Pre-requisites

How to run CapRover on ThreeFold Grid 3:

In this guide, we will use Caprover to setup your own private Platform as a service (PaaS) on ThreeFold grid 3 infrastructure.

clone the project repo

git clone https://github.com/freeflowuniverse/freeflow_caprover.git

A) leader node deployment/setup:

step 1: Deploy a leader Node
step 2: Connect Root Domain

After the container runs, you will now need to connect your Caprover instance to a Root Domain.

Let’s say you own example.com. You can set *.something.example.com as an A-record in your DNS settings to point to the IP address of the server where you installed CapRover. To do this, go to the DNS settings in your domain provider website, and set a wild card A record entry.

For example: Type: A, Name (or host): *.something.example.com, IP (or Points to): 110.122.131.141 where this is the IP address of your CapRover machine.

TYPE: A record
HOST: \*.something.example.com
POINTS TO: (IP Address of your server)
TTL: (doesn’t really matter)

To confirm, go to https://mxtoolbox.com/DNSLookup.aspx and enter somethingrandom.something.example.com and check if IP address resolves to the IP you set in your DNS.

Note

somethingrandom is needed because you set a wildcard entry in your DNS by setting *.something.example.com as your host, not something.example.com.

Step 3: CapRover Root Domain Configurations

skip this step if you provided your root domain in the TerraFrom configuration file

Once the CapRover is initialized, you can visit http://[IP_OF_YOUR_SERVER]:3000 in your browser and login to CapRover using the password from tf output noted in previous step. also you can change your password later.

In the UI enter you root domain and press Update Domain button.

Step 4: Access the Captain Dashboard

Once you set your root domain as caprover.example.com, you will be redirected to captain.caprover.example.com.

Now CapRover is ready and running in a single node.

To allow cluster mode

This information is required in the next section to run Caprover in cluster mode.

B) Worker node deployment/setup:

step 1: Deploy a worker Node

This means that your worker node is now ready and have joined the cluster successfully.

You can also verify this from capRover dashboard in Cluster tab, check Nodes section, you should be able to see the new worker node added there.

Now CapRover is ready in cluster mode(more than one server).

To run One-Click Apps please follow this tutorial

Implementations details: