README.md 2.4 KB

ShariX Open Webapp Base

!!! master branch is outdated. Use unstable instead, until this message are disappears !!!

The base Django project of a service web application to which other modules are connected.

Installation / Upgrade

  1. download or clone repository.
  2. go to the root of the repository.
  3. run ./bin/install.sh
  4. edit file ./bin/install.cfg if needed
  5. run ./bin/install.sh
  6. edit file ./.env and write settings for PostgreSQL database
  7. run ./bin/install.sh
  8. run ./bin/install_service.sh
  9. check status service systemctl status sharix_open.service

Installation app systemd service

run script

./bin/install_service.sh

systemctl basic

show status:

systemctl status sharix_main

restart:

systemctl restart sharix_main

stop:

systemctl restart sharix_main

start:

systemctl start sharix_main

Test Users

During the installation/upgrade, you can pass the GENERATE_TEST_USERS=1 is set in the install.cfg file to automatically create test users. These users will be assigned to the TEST group. Additionally, if the DEBUG setting is enabled (DEBUG=True in core/settings_vars.py), these test users will be marked as active and can log in. If DEBUG is disabled (DEBUG=False), the users will be inactive and unable to log in.

Alternative gen test user

Use command:

python manage.py create_metaservice_test_users

Properties

  • Username: test-<group_name>-<ordinal_number_in_group>.
  • Phone number: <group_id>0<ordinal_number_in_group>.
  • Password: All test users share the same password: sharix-open-test.

    TEST_USERS=true
    

Configuration

For basic project configuration when deploying, use the core/settings_vars.py. This file is automatically created during the installation script execution, in case this file has not been created yet. It is a copy of core/ _settings_vars.py and contains some default settings that allow the project to run locally and is more suitable for development.

Be careful when adding new settings during development and remember to add them to core/_settings_vars.py, as core/settings_vars.py is ignored by Git for security reasons.

You can also change the settings in bin/install.cfg. This file contains the links to repositories required for the project to work.

Launch

To start the web application, run bin/start.sh.