Skip to content
This repository was archived by the owner on Feb 22, 2019. It is now read-only.

Latest commit

 

History

History
72 lines (51 loc) · 1.64 KB

running.md

File metadata and controls

72 lines (51 loc) · 1.64 KB

Running an instance of Litecord

This guide assumes you're running the official gateway component and the rest-py component

Requirements

  • A Linux system
  • PostgreSQL
  • Elixir 1.6.4
  • Python 3.6.4

Pre-Installation

Firstly, start postgres and run the schema file(from this repo) there. You can create your own litecord user (recommended).

CREATE USER litecord WITH PASSWORD 'somethingsecure';
CREATE DATABASE litecord;
GRANT ALL PRIVILEGES ON DATABASE litecord TO litecord;
psql -U litecord -f schema.sql

Installing gateway

git clone https://github.com/litecord/gateway
cd gateway
mix deps.get
mix compile

After installing, you should change the configuration for the gateway on the config/config.exs file (you should not change http_port and https_port).

Running gateway

iex -S mix

No, there aren't any "hot reload" commands of fancy deployment strategies with distillery or edeliver. Feel free if you want to make one though.

Installing rest-py

git clone https://github.com/litecord/rest-py
cd rest-py

# the use of a separated enviroment is recommended
python3.6 -m venv env
env/bin/python -m pip install -Ur requirements.txt

Edit lconfig.py with accordingly (Usually just change pgargs).

Running rest-py

env/bin/python run.py

Post-installation notes

A general rule of thumb is running gateway before rest-py(or any rest component). Running rest-py before gateway will make rest-py try to reconnect with gateway.