summaryrefslogtreecommitdiff
path: root/DEVELOP.md
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-07-05 11:14:18 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-07-05 11:14:18 +0200
commit6dcbeb525acec3b17ec24dfbb0ff4d4d6a797b6f (patch)
tree635ef23045c1a728f26039bb799e85289350b1db /DEVELOP.md
parent56b210a8c132bc7ec91e4e862a3203717a766873 (diff)
downloadIshtar-6dcbeb525acec3b17ec24dfbb0ff4d4d6a797b6f.tar.bz2
Ishtar-6dcbeb525acec3b17ec24dfbb0ff4d4d6a797b6f.zip
Add documentation for development
Diffstat (limited to 'DEVELOP.md')
-rw-r--r--DEVELOP.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/DEVELOP.md b/DEVELOP.md
new file mode 100644
index 000000000..f7398ba26
--- /dev/null
+++ b/DEVELOP.md
@@ -0,0 +1,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
+```