blob: f7398ba26ac93af8ba52be0d87436f72aeaeca8f (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
## Develop environnement for Debian buster
Installation instruction for a debian buster with sudo.
### Install base source code
```
sudo apt-get update
sudo apt-get install git sed python3-pip libpq-dev python3-dev libjpeg-dev zlib1g-dev \
libxml2-dev libxslt1-dev libgeos-dev python3-cairocffi tidy libtidy-dev binutils \
libproj-dev gdal-bin libpangocairo-1.0-0 pandoc graphviz
cd my_workspace
python3 -m venv ishtar-venv
. ./ishtar-venv/bin/activate
git clone https://gitlab.com/iggdrasil/ishtar.git # or your forked project on gitlab
cd ishtar
pip3 install -r requirements.txt
```
### Install postgresql database
```
apt install postgresql postgresql-contrib postgresql-11-postgis-2.5 \
postgresql-11-postgis-2.5-scripts
sudo -u postgres psql
CREATE DATABASE ishtar;
CREATE USER ishtar WITH ENCRYPTED PASSWORD 'mypassword';
GRANT ALL PRIVILEGES ON DATABASE ishtar TO ishtar;
```
### Configure and initialize your instance
```
cd my_workspace
. ./ishtar-venv/bin/activate
cd ishtar
ISHTAR_PATH=`pwd`
cp example_project/local_settings.py.sample example_project/local_settings.py
editor example_project/local_settings.py
# edit settings: SECRET_KEY, DATABASE
cd example_project
# collect static data
python3 ./manage.py collectstatic --noinput
# compile translations
LOCALE=fr
python3 manage.py compilemessages -l $LOCALE
# DB feeding
python3 ./manage.py migrate
# loading fixtures
FIXTURES="$ISHTAR_PATH/fixtures/initial_data-auth-fr.json $ISHTAR_PATH/ishtar_common/fixtures/initial_data-fr.json $ISHTAR_PATH/ishtar_common/fixtures/initial_importtypes-fr.json $ISHTAR_PATH/archaeological_operations/fixtures/initial_data-fr.json $ISHTAR_PATH/archaeological_operations/fixtures/initial_data_relation_type_norel-fr.json $ISHTAR_PATH/archaeological_operations/fixtures/initial_data_relation_type-fr.json $ISHTAR_PATH/archaeological_context_records/fixtures/initial_data-fr.json $ISHTAR_PATH/archaeological_context_records/fixtures/initial_data_relation_type_norel-fr.json $ISHTAR_PATH/archaeological_context_records/fixtures/initial_data_relation_type-fr.json $ISHTAR_PATH/archaeological_files/fixtures/initial_data-fr.json $ISHTAR_PATH/archaeological_finds/fixtures/initial_data-fr.json $ISHTAR_PATH/archaeological_warehouse/fixtures/initial_data-fr.json"
for data in $FIXTURES; do
echo $data;
python3 ./manage.py loaddata $data;
done
# create superuser
python3 ./manage.py createsuperuser
```
|