From 49457d8a623b07798a34927d50d610fb36813a50 Mon Sep 17 00:00:00 2001 From: knuxify Date: Mon, 30 Dec 2019 14:21:42 +0100 Subject: [PATCH 1/2] docs: add basic selfhosting guide --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index a84b352..21e9216 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ # FediBooks + A web UI for creating your very own ebooks bots. + +# Selfhosting + +1. Install ``python3`` and ``mariadb``. If you're installing on Windows, make sure to check "Add Python to PATH" during Python installation. + +2. Install the requirements, using ``pip``: + +``` +# pip3 install -r ./requirements.txt +``` + +If this doesn't work, try using ``pip`` instead. If it still doesn't work, you might have to install an additional package (for example, ``python-pip`` on Arch Linux). + +3. Go to the ``app`` directory and copy the config.sample.json file to ``config.json``. + +4. Fill in the newly created ``config.json`` file. + +5. Run ``python3 app/setup.py`` and follow the on-screen prompts. + +6. Open the MySQL prompt (using the ``mysql`` command) and type in the following commands: + +``` +CREATE DATABASE `fedibooks`; +CREATE USER 'myuser' IDENTIFIED BY 'mypassword'; +GRANT USAGE ON *.* TO 'myuser'@localhost IDENTIFIED BY 'mypassword'; +GRANT ALL privileges ON `fedibooks`.* TO 'myuser'@localhost; +FLUSH PRIVILEGES; +exit +``` + +where ``fedibooks`` is your database name, ``myuser`` is your database username and ``mypassword`` is your database user's password. + +7. Run + +``` +# mysql -u USERNAME -p DATABASE < db/setup.sql +``` + +where USERNAME is your database username and DATABASE is your database name. + +8. Run ``./run.sh`` to start FediBooks. From cb39b4cfea1fe4fce2653692f35d4f577554b9d3 Mon Sep 17 00:00:00 2001 From: knuxify Date: Mon, 30 Dec 2019 14:30:36 +0100 Subject: [PATCH 2/2] docs: make the selfhosting guide a bit more clear --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21e9216..1a22a56 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ A web UI for creating your very own ebooks bots. If this doesn't work, try using ``pip`` instead. If it still doesn't work, you might have to install an additional package (for example, ``python-pip`` on Arch Linux). -3. Go to the ``app`` directory and copy the config.sample.json file to ``config.json``. +3. Copy the ``app/config.sample.json`` file to ``app/config.json``. -4. Fill in the newly created ``config.json`` file. +4. Fill in the ``app/config.json`` file. 5. Run ``python3 app/setup.py`` and follow the on-screen prompts.