ci-test #1

Merged
palkan merged 9 commits from ci-test into develop 2023-01-22 08:57:27 +00:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 856068d61f - Show all commits

View File

@ -71,8 +71,6 @@ steps:
find . -name ".travis*" -prune -exec rm -rf '{}' \; find . -name ".travis*" -prune -exec rm -rf '{}' \;
find . -name "installed.json" -prune -exec rm -rf '{}' \; find . -name "installed.json" -prune -exec rm -rf '{}' \;
find . -name "*.sample" -prune -exec rm -rf '{}' \; find . -name "*.sample" -prune -exec rm -rf '{}' \;
find . -type d ! -path './.git/**' ! -path './static/**' ! -path "./static" ! -path ./*/modules/*/static* -exec bash -c 'test -f {}/.htaccess && echo -n "[ SKIP ] " || (cp ./docker-build/.htaccess {} && echo -n "[ ADD ] ") && echo {}/.htaccess' \;
cp docker-build/Dockerfile Dockerfile
rm -f composer.* rm -f composer.*
- name: Build docker image - name: Build docker image

View File

@ -8,12 +8,14 @@ use PhpAmqpLib\Message\AMQPMessage;
$lineReadTimeout=1; $lineReadTimeout=1;
$port=getenv("SCANNER_PORT");// "/dev/ttyACM0"; $port=getenv("SCANNER_PORT");
$rabbitHost=getenv("RABBITMQ_HOST"); // "rabbitmq"; $rabbitHost=getenv("RABBITMQ_HOST");
$rabbitPort=getenv("RABBITMQ_PORT")?getenv("RABBITMQ_PORT"):5672; $rabbitPort=getenv("RABBITMQ_PORT")?getenv("RABBITMQ_PORT"):5672;
$rabbitLogin=getenv("RABBITMQ_USER");//'guest'; $rabbitLogin=getenv("RABBITMQ_USER");
$rabbitPass=getenv("RABBITMQ_PASSWORD"); //'guest'; $rabbitPass=getenv("RABBITMQ_PASSWORD");
$rabbitUseSSL=getenv("RABBITMQ_USE_SSL")==="true"; // false; $rabbitUseSSL=getenv("RABBITMQ_USE_SSL")==="true";
$rabbitVirtualHost=getenv("RABBITMQ_VIRTUAL_HOST")?getenv("RABBITMQ_VIRTUAL_HOST"):"/";
$routingTag=null; $routingTag=null;
$connection=null; $connection=null;
@ -45,9 +47,9 @@ function rabbitConnect($rabbitHost, $rabbitPort, $rabbitLogin, $rabbitPass, $rab
'allow_self_signed' => false 'allow_self_signed' => false
]; ];
$connection = new AMQPSSLConnection($rabbitHost, $rabbitPort, $rabbitLogin, $rabbitPass,'/',$ssl_opts); $connection = new AMQPSSLConnection($rabbitHost, $rabbitPort, $rabbitLogin, $rabbitPass,$rabbitVirtualHost,$ssl_opts);
} else { } else {
$connection = new AMQPStreamConnection($rabbitHost, $rabbitPort, $rabbitLogin, $rabbitPass); $connection = new AMQPStreamConnection($rabbitHost, $rabbitPort, $rabbitLogin, $rabbitPass,$rabbitVirtualHost);
} }
return $connection; return $connection;
} }