From ff541c2cba7ca82655e673c89f09e81e2d1f84d1 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Wed, 11 Aug 2021 21:07:54 +0200 Subject: [PATCH] Autopush. --- agora install.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/agora install.md b/agora install.md index 0acee7d66..2fb9021f8 100644 --- a/agora install.md +++ b/agora install.md @@ -7,22 +7,21 @@ As of the time of writing the [[Agora]] consists of three distinct repositories: -- The ***Agora proper***, which contains the root of a tree defined by its configuration and [[contract]]. +- The ***Agora proper***, which contains the root of a tree plus instructions on how to grow it. This is defined by its configuration and its [[contract]]. - -> [[go/agora]] -- The [[Agora Server]], a web interface to the Agora, mostly [[read only]]. It is likely the interface you're reading this in if you're in [anagora.org](https://anagora.org). +- The [[Agora Server]], a web interface to the Agora, mostly [[read only]]. It is the interface you're reading this in if you're in [anagora.org](https://anagora.org). - -> [[go/agora-server]] -- [[Agora Bridge]], a repository that contains various means of ***writing*** to the Agora and more generally interfacing with it. This includes the process that interacts with the Agora's configuration and runs fetch/update tasks; and a set of platform-specific bots to run system accounts. +- [[Agora Bridge]], a repository that contains various means of ***writing*** to the Agora and more generally interfacing with it. This includes the process that interacts with the Agora's configuration (in the first repository in the list) and runs fetch/update tasks; and a set of platform-specific bots. - -> [[go/agora-bridge]] - -The following instructions assume you run all services under the same user in a Unix-like system (anagora.org runs on Debian GNU/Linux). We suggest `agora`: +The following instructions assume you clone all repositories and run all services under the same user in a Unix-like system (`anagora.org` runs on Debian GNU/Linux). We suggest `agora`: ``` $ adduser agora # follow prompts $ sudo su - agora ``` -Then clone all repositories: +To get all repositories: ``` $ git clone https://github.com/flancian/agora.git @@ -45,11 +44,18 @@ You need to edit `gardens.yaml` if you want to carry a different set of sources. If you edit the [[CONTRACT]], your Agora might become incompatible with the Agora you forked from. Conflict resolution is part of [[agora protocol]] but currently not specified. ### [[Agora Server]] + - [[python]] backend, [[flask]] based. - [[typescript]] frontend, no framework for now. -First you X, then you Y, then you add a [[systemd service]]. +If you installed in non-standard paths (i.e. your repos are not in `/home//`), edit `app/config.py`. + +You need to create a Python virtual environment, install packages from `requirements.txt`, then run the Agora either on a shell or as a [[systemd service]]. + + You can `./run-dev.sh` (for development) or `./run-prod.sh` (if you want to serve to the outside world). If you do the latter, you may want to set up [[uwsgi]] in [[nginx]] and make it stick as a [[systemd service]] using `agora-server.service` as an example. Please refer to https://github.com/flancian/agora-server#to-develop for details. + ### Agora Bridge + - [[python]] - [[gardens py]] - [[yaml]] @@ -57,7 +63,9 @@ First you X, then you Y, then you add a [[systemd service]]. - [[agora bot yaml]] - [[typescript]] -First you X, then you Y, then you add a [[systemd service]]. +You need to create a Python virtual environment, install packages from `requirements.txt`, then run `./run-prod.sh` either on a shell or as a [[systemd service]]. This will pull from all sources in the root repository's `gardens.yaml` in a loop. + +You can also optionally run a number of bots that will interact with people in supported platforms. See the `bots` directory and https://github.com/flancian/agora-bridge for more. ## And now?