Skip to content
Snippets Groups Projects
README.md 2.19 KiB
Newer Older
Torsten Kunst's avatar
Torsten Kunst committed
# ZMS Admin

[![pipeline status](https://gitlab.com/eappointment/zmsstatistic/badges/main/pipeline.svg)](https://gitlab.com/eappointment/zmsstatistic/-/commits/main)
[![coverage report](https://gitlab.com/eappointment/zmsstatistic/badges/main/coverage.svg)](https://eappointment.gitlab.io/zmsstatistic/_tests/coverage/index.html)


Torsten Kunst's avatar
Torsten Kunst committed
# ZMS Statistic

This application offers an administrative web frontend for statistics.

## Requirements

Torsten Kunst's avatar
Torsten Kunst committed
* PHP 7.3+

## Installation

The variable `$WEBROOT` represents the parent path to install the application.

```bash
    cd $WEBROOT
Torsten Kunst's avatar
Torsten Kunst committed
    git clone https://gitlab.com/eappointment/zmsstatistic.git
    cd zmsstatistic
    make live
    cp config.example.php config.php
```

Torsten Kunst's avatar
Torsten Kunst committed
## Development
Torsten Kunst's avatar
Torsten Kunst committed
For development, additional modules are required. Commits from a live environment require to ignore the pre-commit hooks.
For local development and to compile public js and css files do
Torsten Kunst's avatar
Torsten Kunst committed
```bash
    ...
    make dev
    make build
    ...
Torsten Kunst's avatar
Torsten Kunst committed
## Configuration
Torsten Kunst's avatar
Torsten Kunst committed
Edit the `config.php` and add/change settings for accessing the API.
Torsten Kunst's avatar
Torsten Kunst committed
To enable the application, you have to point the webserver to the public-path in the installation.
The following rewrite rules are required, examples for Apache2 and nginx:
Torsten Kunst's avatar
Torsten Kunst committed
```apache
    RewriteRule ^/admin/_(.*)       $WEBROOT/zmsstatistic/public/_$1
    RewriteRule ^/admin/(.*)        $WEBROOT/zmsstatistic/public/index.php/$1
```
Torsten Kunst's avatar
Torsten Kunst committed
```nginx
    location ~ ^/(admin)/index\.php$ {
        fastcgi_pass    php-upstream;
        fastcgi_index   index.php;
        include         fastcgi_params;
        fastcgi_param   SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        fastcgi_param   SERVER_NAME       $cgi_server_name;
        fastcgi_param   SERVER_PORT       $cgi_server_port;
        fastcgi_param   SERVER_PROTOCOL   $cgi_server_protocol;
        fastcgi_param   REQUEST_SCHEME    $cgi_server_protocol;
        fastcgi_param   HTTPS             $cgi_server_https if_not_empty;
    }

    location @rewrite {
        rewrite ^/admin/([^?]*)$    $WEBROOT/zmsstatistic/index.php?/$1 last;
    }
```
    
## Testing

To test application run the following command:

    bin/test


Torsten Kunst's avatar
Torsten Kunst committed
For a detailed project description, see https://gitlab.com/eappointment/eappointment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.