This guide assumes you're running the official gateway component
and the rest-py
component
- A Linux system
- PostgreSQL
- Elixir 1.6.4
- Python 3.6.4
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
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
).
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.
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
).
env/bin/python run.py
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.