implement configuration via envvars

fixes #1
master
lub 5 years ago
parent 4a149499d4
commit e285a7e96d

@ -9,6 +9,7 @@ RUN composer install
FROM docker.io/php:apache
EXPOSE 9367/tcp
ENV QUERY_HOST, QUERY_PORT, QUERY_USER_NAMe, QUERY_USER_PASSWORD_FILE
# copy apache configs
RUN rm /etc/apache2/sites-enabled/* \

@ -22,10 +22,10 @@ $up = $registry->getOrRegisterGauge(
$up->set(1, []);
$host = '192.168.178.55';
$port = 10011;
$user = rawurlencode('serveradmin');
$password = rawurlencode('4NReP1Wf');
$host = getenv('QUERY_HOST');
$port = getenv('QUERY_PORT');
$user = rawurlencode(getenv('QUERY_USER_NAME'));
$password = rawurlencode(trim(file_get_contents(getenv('QUERY_USER_PASSWORD_FILE'))));
$uri = 'serverquery://'.$user.':'.$password.'@'.$host.':'.$port.'/';

Loading…
Cancel
Save