Updated install instructions
This commit is contained in:
parent
f95ffd529f
commit
f28b67c00d
28
README.md
28
README.md
|
@ -1,25 +1,21 @@
|
||||||
# Installation
|
# Installation
|
||||||
* Open shell as user nxy will run. These instructions will use ```nxy``` as user and ```/home/nxy``` as its home directory.
|
* Setup pgsql, create user and database, create schema (last step only if you have a dump):
|
||||||
* Install virtualenvwrapper (ideally system wide).
|
- ```psql -U postgres```
|
||||||
* Open shell as user ```nxy```
|
- ```CREATE ROLE nxy WITH ENCRYPTED PASSWORD 'your-password';```
|
||||||
- ```sudo -u nxy -i```
|
- ```ALTER ROLE nxy LOGIN;```
|
||||||
* Clone repo and change current dir
|
- ```CREATE DATABASE nxy_prod OWNER nxy;```
|
||||||
|
- ```\q```
|
||||||
|
- ```psql -U nxy -U nxy_prod < nxy/files/schema.sql```
|
||||||
|
- ```psql -U nxy -d nxy_prod < path/to/dump.sql```
|
||||||
|
* Clone repo
|
||||||
- ```git clone https://gitfap.de/mrhanky/nxy.git```
|
- ```git clone https://gitfap.de/mrhanky/nxy.git```
|
||||||
- ```cd nxy```
|
|
||||||
* Create virtualenv, activate it and install dependencies
|
* Create virtualenv, activate it and install dependencies
|
||||||
- ```python3 -m venv env```
|
- ```python3 -m venv env```
|
||||||
- ```source env/bin/active```
|
- ```source env/bin/active```
|
||||||
- ```pip install -r nxy/requirements.txt```
|
- ```pip install -r nxy/requirements.txt```
|
||||||
* Create needed tables in the database:
|
* Copy ```nxy/files/config.json``` and ```nxy/files/config.json``` and modify them
|
||||||
- ```psql -U <your db user> < files/schema.sql```
|
- ```cp nxy/files/{.env,config.json} .```
|
||||||
* Copy ```nxy/files/.env``` and insert values in ```.env``` (replace everything wrapped in < and >)
|
- ```vim .env config.json```
|
||||||
- ```cp nxy/files/.env .env```
|
|
||||||
- ```vim .env```
|
|
||||||
* Copy ```nxy/files/config.json``` and modify it (setup ZNC etc.)
|
|
||||||
- ```cp nxy/files/config.json config.json```
|
|
||||||
- ```vim config.json```
|
|
||||||
* If database is empty, import your database dump:
|
|
||||||
- ```psql -U nxy -d nxy < /path/to/dump.sql```
|
|
||||||
* Enable linger for nxy user (so the user unit starts on boot)
|
* Enable linger for nxy user (so the user unit starts on boot)
|
||||||
- ```sudo loginctl enable-linger nxy```
|
- ```sudo loginctl enable-linger nxy```
|
||||||
* Link systemd unit, enable and run it
|
* Link systemd unit, enable and run it
|
||||||
|
|
Loading…
Reference in New Issue
Block a user