|
1 |
| -> Under development! |
2 |
| -
|
3 | 1 | # TaskTimeTerminate-SyncServer
|
| 2 | +> A docker image providing a sync-server for TaskTimeTerminate |
| 3 | +
|
| 4 | +## Features |
| 5 | +- Server Task |
| 6 | + - Add Tasks directly on the server |
| 7 | +- Statistics |
| 8 | + - Show stats one the server |
| 9 | + - Show charts made with ChartJS |
| 10 | +- Account Management |
| 11 | + - Each user gets an account, also called group |
| 12 | + - This account can have |
| 13 | +- Device Management |
| 14 | + |
| 15 | +## Install on server |
| 16 | +This is a docker project, so it you will need docker to run it. |
| 17 | +It is recommended to use the [docker-compose.yml](https://github.com/KIMB-technologies/TaskTimeTerminateServer/blob/master/docker-compose.yml) provided. |
| 18 | + |
| 19 | +1. Copy the [docker-compose.yml](https://github.com/KIMB-technologies/TaskTimeTerminateServer/blob/master/docker-compose.yml) |
| 20 | +2. Make sure to bind to a free port |
| 21 | +3. Change the volume to a location wich is regularly made a backup from. (Inside the container all data is stored in `/php-code/data/`) |
| 22 | +4. Edit environment variables |
| 23 | + - `DEVMODE` should always be `false` (enables error messages) |
| 24 | + - `CONF_DOMAIN` the url where the service will be hosted (what the webbrowser sees) |
| 25 | + - `CONF_TIMEZONE` a PHP timezone string, matching the location of the server users (see https://www.php.net/manual/en/timezones.php for list of supported ones) |
| 26 | + - `ADMIN_ACCOUNT` username/ groupname of the initial account (will be created on first container startup; will be an admin user) |
| 27 | + - `ADMIN_PASSWORD` password for the initial account |
| 28 | +5. Run the container and log into the Webinterface |
| 29 | + |
| 30 | +> One may delete `ADMIN_ACCOUNT` and `ADMIN_PASSWORD` after the account is created (and also change the password), |
| 31 | +> If `ADMIN_ACCOUNT` is set and the account already exists, the system will overwrite the password with `ADMIN_PASSWORD`. |
| 32 | +
|
| 33 | +## Setup TTT-Client |
| 34 | +### TTT-Client |
| 35 | +> See https://github.com/KIMB-technologies/TaskTimeTerminate for more information about TTT. |
| 36 | +
|
| 37 | +1. Log into the Webinterface and go to `Device Management` |
| 38 | +2. Add a new device and remember its token. |
| 39 | +3. Run `ttt conf sync server` in your client |
| 40 | +4. Type the URL of this installation, the account name/ group, the client token and the devices/ clients name. |
| 41 | +5. The client will import all recorded data to the installation and also update it with new completed task. |
| 42 | + |
| 43 | +## Im & Export |
| 44 | +This repository contains a script to import data from other devices to the server |
| 45 | +and also a script that exports the data of all devices to a directory. |
| 46 | +The format used is the same as used in the local directory synchronisation. |
| 47 | + |
| 48 | +So one may transfer the the data from an old client (not used anymore, used clients will |
| 49 | +automatically import their data when they are connected to the server for the first time) |
| 50 | +to the server. |
| 51 | + |
| 52 | +### Import to Server |
| 53 | +Create the the device for which the data should be imported and |
| 54 | +remember its token. (The name of the device can only be set via the Webinterface). |
| 55 | + |
| 56 | +1. Open `./imexport/import.php` |
| 57 | +2. Fill in `Server URL, Account Name, Device Name, Device Token` between `APIClient( ... );` as stated in the file |
| 58 | +3. Change the `$sourcePath`, it has to be the directory containing the devices data (e.g. `2020-04-01.json`, `2020-04-03.json`, ...) |
| 59 | +4. Set the timezone `date_default_timezone_set( 'Europe/Berlin' );` (see https://www.php.net/manual/en/timezones.php for list of supported ones) |
| 60 | +4. Run `php ./imexport/import.php` |
| 61 | +5. The data for the device will be available in the Webinterface (and through the API). |
| 62 | + |
| 63 | +### Export from Server |
| 64 | +One may use any device of an account. |
4 | 65 |
|
5 |
| -A docker image providing a sync-server for TaskTimeTerminate |
| 66 | +1. Open `./imexport/export.php` |
| 67 | +2. Fill in `Server URL, Account Name, Device Name, Device Token` between `APIClient( ... );` as stated in the file |
| 68 | +3. One may change the `$destPath`, it has to be any empty directory (or it will be created). |
| 69 | +4. Run `php ./imexport/export.php` |
| 70 | +5. The data for all devices will show up in `$destPath` |
0 commit comments