summaryrefslogtreecommitdiff
path: root/INSTALL.md
blob: 3cd757fa391f1a5999288362da84ef3b6229f34b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Installation
============

On a Debian Stretch installation:

```bash
SRV_PATH="/srv"
VENV_PATH="/srv/venv"

# main dependencies
apt install python3 nginx git uwsgi uwsgi-plugin-python3 python3-virtualenv python3-pip

# source code
cd $SRV_PATH
git clone https://gitlab.com/iggdrasil/ishtar-pergamon.git

# virtualenv
mkdir $VENV_PATH
virtualenv --system-site-packages $VENV_PATH/pergamon
. $VENV_PATH/pergamon/bin/activate
pip install -r $SRV_PATH/ishtar-pergamon/requirements.txt

cd $SRV_PATH/ishtar-pergamon
# initialize DB, static files, translations...
cp pergamon/settings/local.py.sample pergamon/settings/local.py
vim pergamon/settings/local.py  # at least set a SECRET_KEY, BASE_URL and ALLOWED_HOSTS

chown -R www-data:www-data media
cp Makefile.example Makefile
make collectstatic
make migrate
make compilemessages
./manage.py createsuperuser

# webserver configuration
cp conf/nginx.conf.template /etc/nginx/sites-available/pergamon.conf
vim /etc/nginx/sites-available/pergamon.conf  # change at least server name
ln -s /etc/nginx/sites-available/pergamon.conf /etc/nginx/sites-enabled/pergamon.conf

cp conf/uwsgi.ini.template /etc/uwsgi/apps-available/pergamon.ini
vim /etc/uwsgi/apps-available/pergamon.ini  # change at least projectdomain
ln -s /etc/uwsgi/apps-available/pergamon.ini /etc/uwsgi/apps-enabled/pergamon.ini
systemctl restart uwsgi nginx
```