Ocelot-Social/installation.md
2019-04-14 23:46:34 +02:00

3.8 KiB

Installation

The repository can be found on GitHub. https://github.com/Human-Connection/Human-Connection

We give write permissions to every developer who asks for it. Just text us on Discord.

Clone the Repository

Clone the repository, this will create a new folder called Human-Connection:

{% tabs %} {% tab title="HTTPS" %}

$ git clone https://github.com/Human-Connection/Human-Connection.git

{% endtab %}

{% tab title="SSH" %}

$ git clone git@github.com:Human-Connection/Human-Connection.git

{% endtab %} {% endtabs %}

Change into the new folder.

$ cd Human-Connection

Directory Layout

There are four important directories:

  • Backend runs on the server and serves as a middleware to the database
  • Frontend server-side and client-side rendered application
  • Deployment contains configuration for kubernetes deployments
  • Cypress end-to-end tests with cypress

In order to setup the application you have to setup the frontend and backend either locally on your system or you can also use our provided docker installation.

Docker Installation

Docker is a software development container tool that combines software and its dependencies into one standardized unit that contains everything needed to run it. This helps us to avoid problems with dependencies and makes installation easier.

General Installation of Docker

There are sevaral ways to install Docker CE on your computer or server.

{% tabs %} {% tab title="Docker Desktop macOS" %} Follow these instructions to install Docker Desktop on macOS. {% endtab %}

{% tab title="Docker Desktop Windows" %} Follow these instructions to install Docker Desktop on Windows. {% endtab %}

{% tab title="Docker CE" %} Follow these instructions to install Docker CE.

This is a great option for Linux users. {% endtab %} {% endtabs %}

Check the correct Docker installation by checking the version before proceeding. E.g. we have the following versions:

$ docker --version
Docker version 18.09.2
$ docker-compose --version
docker-compose version 1.23.2

Installation with Docker

Run the following command to install Nitro as a Docker container. This installation includes Neo4j.

The installation takes a bit longer on the first pass or on rebuild ...

$ docker-compose up

# rebuild the containers for a cleanup
$ docker-compose up --build

Seed Database

To seed the Neo4j database with default data, that GraphQL requests or playing with our GraphQL Playground returns anything else than an empty response, run the command.

Run the following command to seed the Neo4j database with default data requested by Nitro-Web through GraphQL or when you play with our GraphQL playground.

# open another terminal

# create indices etc.
$ docker-compose exec neo4j migrate

# seed database
$ docker-compose exec backend yarn run db:seed

Wipe out Neo4j database in Docker

To wipe out your neo4j database and delete the volumes send command:

# open another terminal and run
$ docker-compose down -v

Video Tutorial

{% hint style="info" %} TODO: Link to video {% endhint %}

Local Installation

Install the dependencies

$ yarn install
$ cd backend && yarn install
$ cd ../webapp && yarn install
$ cd ..

Copy Environment Variables

$ cp cypress.env.template.json cypress.env.json
$ cp backend/.env.template backend/.env
$ cp webapp/.env.template webapp/.env

Configure the new files according to your needs and your local setup.