Finalize 2.0.0
This commit is contained in:
parent
eb0cebea4b
commit
cae20ac477
9 changed files with 24 additions and 92 deletions
|
@ -6,7 +6,6 @@
|
|||
* Add tree view for online clients
|
||||
* Update deployment and release documentation and examples
|
||||
* Update dependencies and force PHP 7.3
|
||||
* Add fallback for values for `env` file
|
||||
|
||||
## 1.2.4 - 2019/01/18
|
||||
* No info text
|
||||
|
|
|
@ -5,15 +5,10 @@
|
|||
*/
|
||||
class EnvConstants
|
||||
{
|
||||
/**
|
||||
* Default env file loaded
|
||||
*/
|
||||
const ENV_FILE_DEFAULT = "env.default";
|
||||
|
||||
/**
|
||||
* Custom env file
|
||||
*/
|
||||
const ENV_FILE_CUSTOM = "env";
|
||||
const ENV_FILE = "env";
|
||||
|
||||
/**
|
||||
* Site title
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
# site
|
||||
site_title="Teamspeak 3 Web"
|
||||
site_language="en" # values: each yml you specified in data/locale/
|
||||
site_date_format="d.m.Y H:i:s" # values: all possible for Date::class
|
||||
|
||||
# theme
|
||||
theme="bootstrap4" # values: bootstrap4 (foldernames are used to determine theme in src/View/)
|
||||
theme_cache=false # values: true|false (cache view/twig. makes it faster, disable for debug)
|
||||
|
||||
# teamspeak
|
||||
teamspeak_host="localhost" # 'localhost' or 'name_of_docker_container' if running locally
|
||||
teamspeak_query_port=10011
|
||||
teamspeak_user="serveradmin"
|
||||
teamspeak_tree_view="true" # show a tree view in the details of online clients if a server has been selected
|
||||
|
||||
# log
|
||||
log_name="ts3web" # values: all strings
|
||||
log_level="INFO" # values: DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY
|
|
@ -279,7 +279,3 @@ about.body: |
|
|||
ts3web is a web interface for one TeamSpeak 3 Server. It's using serverquery to login. This web interface aims to be as simple as possible. The minimalistic approach is intentional.
|
||||
|
||||
Feel free to submit pull requests if you like to help. More information are here: https://hub.docker.com/r/varakh/ts3web
|
||||
|
||||
Features which are currently not supported:
|
||||
- modify permissions (only viewing)
|
||||
- modify files (only viewing)
|
|
@ -1,33 +0,0 @@
|
|||
version: '2'
|
||||
networks:
|
||||
teamspeak:
|
||||
external: false
|
||||
services:
|
||||
app:
|
||||
container_name: teamspeak_app
|
||||
image: teamspeak:latest
|
||||
volumes:
|
||||
- ./app:/var/ts3server
|
||||
- ./whitelist.txt:/whitelist.txt
|
||||
ports:
|
||||
- 10011:10011
|
||||
- 30033:30033
|
||||
- 9987:9987/udp
|
||||
environment:
|
||||
- TS3SERVER_LICENSE=accept
|
||||
- TS3SERVER_IP_WHITELIST=/whitelist.txt
|
||||
restart: always
|
||||
network_mode: "host"
|
||||
web:
|
||||
container_name: teamspeak_web
|
||||
image: teamspeak_web:latest
|
||||
volumes:
|
||||
- ./env:/var/www/html/application/config/env
|
||||
- ./snapshots:/var/www/html/application/data/snapshots
|
||||
ports:
|
||||
- 127.0.0.1:8181:80
|
||||
depends_on:
|
||||
- app
|
||||
restart: always
|
||||
networks:
|
||||
- teamspeak
|
|
@ -1,17 +0,0 @@
|
|||
# site
|
||||
site_title="Teamspeak 3 Web"
|
||||
site_language="en" # values: each yml you specified in data/locale/
|
||||
site_date_format="d.m.Y H:i:s" # values: all possible for Date::class
|
||||
|
||||
# theme
|
||||
theme="bootstrap4" # values: bootstrap4 (foldernames are used to determine theme in src/View/)
|
||||
theme_cache=false # values: true|false (cache view/twig. makes it faster, disable for debug)
|
||||
|
||||
# teamspeak
|
||||
teamspeak_host="localhost" # 'localhost' or 'name_of_docker_container' if running locally or IP
|
||||
teamspeak_query_port=10011
|
||||
teamspeak_user="serveradmin"
|
||||
|
||||
# log
|
||||
log_name="ts3web" # values: all strings
|
||||
log_level="INFO" # values: DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY
|
|
@ -1 +0,0 @@
|
|||
127.0.0.1
|
|
@ -20,20 +20,27 @@ class BootstrapHelper
|
|||
public static function bootEnvironment()
|
||||
{
|
||||
$envPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config';
|
||||
$envFile = $envPath . DIRECTORY_SEPARATOR . EnvConstants::ENV_FILE;
|
||||
|
||||
$defaultEnv = new Dotenv($envPath, EnvConstants::ENV_FILE_DEFAULT);
|
||||
$defaultEnvRes = $defaultEnv->load();
|
||||
|
||||
$envFile = $envPath . DIRECTORY_SEPARATOR . EnvConstants::ENV_FILE_CUSTOM;
|
||||
$envRes = [];
|
||||
if (file_exists($envFile)) {
|
||||
$env = new Dotenv($envPath, EnvConstants::ENV_FILE_CUSTOM);
|
||||
$envRes = $env->load();
|
||||
}
|
||||
|
||||
$res = array_merge_recursive($defaultEnvRes, $envRes);
|
||||
|
||||
$env = new Dotenv(realpath($envPath), EnvConstants::ENV_FILE);
|
||||
$res = $env->load();
|
||||
$env->required([
|
||||
EnvConstants::SITE_TITLE,
|
||||
EnvConstants::SITE_LANGUAGE,
|
||||
EnvConstants::SITE_DATE_FORMAT,
|
||||
EnvConstants::THEME,
|
||||
EnvConstants::THEME_CACHE,
|
||||
EnvConstants::TEAMSPEAK_HOST,
|
||||
EnvConstants::TEAMSPEAK_QUERY_PORT,
|
||||
EnvConstants::TEAMSPEAK_USER,
|
||||
EnvConstants::LOG_NAME,
|
||||
EnvConstants::LOG_LEVEL
|
||||
]);
|
||||
return $res;
|
||||
} else {
|
||||
die('No environment file found in ' . realpath($envFile));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,10 @@ class TSInstance
|
|||
|
||||
/**
|
||||
* TeamSpeakWrapper constructor.
|
||||
*
|
||||
* @param $logger
|
||||
* @throws Exception
|
||||
* if no connection can be made
|
||||
*/
|
||||
public function __construct($logger)
|
||||
{
|
||||
|
@ -43,6 +46,7 @@ class TSInstance
|
|||
$this->ts = $ts;
|
||||
$this->logger->debug(sprintf('Connected to %s:%s', $this->host, $this->queryPort));
|
||||
} catch (TSException $e) {
|
||||
$this->logger->error(sprintf('Could not connect to %s:%s', $this->host, $this->queryPort, $e->getMessage()));
|
||||
die($e);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue