Get the repository
Go to the subfolder, where you want to create your new Piki-Application (here /tmp)
$ cd ~/tmp
Clone the repository
$ git clone https://git.mount-mockery.de/application/piki.git
Initialise the repository
$ cd piki $ git submodule init $ git submodule update
Create your virtual python environment
Create python3 environment and activate it
$ python3 -m venv venv $ source venv/bin/activate
Install Piki Requirements
$ pip install -r requirements.txt
Configuration and Initialisation of Piki
Copy the config example as startpoint of your configuration
$ cp config_example/config.py . $ chmod 600 config.py
To set a secret key, you execute the following command to get a random secret key
$ python manage.py
The command will result in an error message, cause you don't have a secret yet. At the End of the error message you'll see a random secret:
KeyError: "You need to create a config.py file including at least a SECRET_KEY definition (e.g.: --> **'HERE IS THE RANDOM SECRET ;-)'** <--)."
Take this key and add it as secret_key instead of None.
Create your initial django database and the first user for Piki
$ python manage.py migrate $ python manage.py createsuperuser $ python manage.py import_system_pages $ python manage.py rebuild_index
Finalise Configuration
Now there are two ways to finalise your configuration. The first way is for a test or development system. The other is for a production System.
Test or development System
Edit config.py and set the Variable DEBUG to True and start the server
$ python manage.py runserver
Production System
Edit config.py and set the Variable ALLOWED_HOSTS. Execute
$ python manage.py collectstatic
to create a folder including all static files. Then add Piki to your server configuration. See also Django Documnetation for further information.