docs: add install doc
This commit is contained in:
parent
df6db3cc56
commit
a14b97243c
|
@ -22,6 +22,7 @@ For an online demo see https://demo.wuttaproject.org/
|
||||||
|
|
||||||
narr/overview
|
narr/overview
|
||||||
glossary
|
glossary
|
||||||
|
narr/install
|
||||||
narr/cli/index
|
narr/cli/index
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|
70
docs/narr/install.rst
Normal file
70
docs/narr/install.rst
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
|
||||||
|
==============
|
||||||
|
Installation
|
||||||
|
==============
|
||||||
|
|
||||||
|
|
||||||
|
Prerequisites
|
||||||
|
-------------
|
||||||
|
|
||||||
|
You'll need Python >= 3.8, and a database. See also
|
||||||
|
:doc:`wuttjamaican:narr/install/prereqs` in the Wutta docs.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
sudo apt install build-essential python3-dev python3-venv postgresql libpq-dev
|
||||||
|
|
||||||
|
As for the database, see also :ref:`wuttjamaican:create-appdb` but FYI
|
||||||
|
these docs will assume a PostgreSQL setup with ``sideshow`` as the DB
|
||||||
|
name (and PG username).
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
sudo -u postgres createuser sideshow
|
||||||
|
sudo -u postgres psql -c "ALTER USER sideshow PASSWORD 'mypassword'"
|
||||||
|
sudo -u postgres createdb -O sideshow sideshow
|
||||||
|
|
||||||
|
|
||||||
|
Virtual Environment
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
You should use a separate Python virtual environment for Sideshow.
|
||||||
|
See also :doc:`wuttjamaican:narr/install/venv` but these docs will
|
||||||
|
assume this exists at ``/srv/envs/sideshow``.
|
||||||
|
|
||||||
|
Note that root privileges are required to create the folder, but then
|
||||||
|
the folder ownership should be changed to whatever you need:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd /srv/envs
|
||||||
|
sudo mkdir -p sideshow
|
||||||
|
sudo chown myname:myname sideshow
|
||||||
|
|
||||||
|
python3 -m venv /srv/envs/sideshow
|
||||||
|
cd /srv/envs/sideshow
|
||||||
|
source bin/activate
|
||||||
|
|
||||||
|
|
||||||
|
Install Sideshow
|
||||||
|
----------------
|
||||||
|
|
||||||
|
First install the Sideshow package to your virtual environment:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd /srv/envs/sideshow
|
||||||
|
bin/pip install Sideshow
|
||||||
|
|
||||||
|
Then you can run the Sideshow installer:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
bin/sideshow install
|
||||||
|
|
||||||
|
That will prompt you for DB connection info etc. When finished you
|
||||||
|
can run Sideshow:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
bin/wutta -c app/web.conf webapp
|
Loading…
Reference in a new issue