From 76692bf3cc69fdac9cda2a8f3188409aacd88bc9 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 7 Apr 2020 11:22:10 +0200 Subject: [PATCH 1/2] PHRAS-3018_reject-php32_4.1 fix : reject install if not php64 --- lib/Alchemy/Phrasea/Command/Setup/Install.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Command/Setup/Install.php b/lib/Alchemy/Phrasea/Command/Setup/Install.php index 8e211a9284..4682eda55a 100644 --- a/lib/Alchemy/Phrasea/Command/Setup/Install.php +++ b/lib/Alchemy/Phrasea/Command/Setup/Install.php @@ -55,7 +55,9 @@ class Install extends Command ->addOption('es-host', null, InputOption::VALUE_OPTIONAL, 'ElasticSearch server HTTP host', 'localhost') ->addOption('es-port', null, InputOption::VALUE_OPTIONAL, 'ElasticSearch server HTTP port', 9200) ->addOption('es-index', null, InputOption::VALUE_OPTIONAL, 'ElasticSearch index name', null) - ->addOption('yes', 'y', InputOption::VALUE_NONE, 'Answer yes to all questions'); + ->addOption('yes', 'y', InputOption::VALUE_NONE, 'Answer yes to all questions') + ->setHelp("Phraseanet can only be installed on 64 bits PHP."); + ; return $this; } @@ -75,6 +77,14 @@ class Install extends Command */ protected function doExecute(InputInterface $input, OutputInterface $output) { + if(PHP_INT_SIZE !== 8) { + $output->writeln(sprintf( + "Phraseanet can only be installed on 64 bits PHP, your version is %d bits (PHP_INT_SIZE=%d).", + PHP_INT_SIZE<<3,PHP_INT_SIZE + )); + return -1; + } + /** @var DialogHelper $dialog */ $dialog = $this->getHelperSet()->get('dialog'); From 134069e5677f07aaee8c4f287b9883b78a9f69e3 Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Tue, 7 Apr 2020 19:14:41 +0200 Subject: [PATCH 2/2] fix for worker and scheduler in configuration.yml --- docker/phraseanet/auto-install.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh index 5ad05e134c..cd81110c9e 100755 --- a/docker/phraseanet/auto-install.sh +++ b/docker/phraseanet/auto-install.sh @@ -38,14 +38,15 @@ fi /var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.namespace $INSTALL_SERVER_NAME /var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis -# RabbitMQ -bin/setup system:config set rabbitmq.server.host rabbitmq -bin/setup system:config set rabbitmq.server.port 5672 -bin/setup system:config set rabbitmq.server.user $INSTALL_RABBITMQ_USER -bin/setup system:config set rabbitmq.server.password $INSTALL_RABBITMQ_PASSWORD -bin/setup system:config set rabbitmq.server.vhost / - +# Bus configuration for scheduler & worker +bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry +bin/setup system:config set workers.queue.worker-queue.host rabbitmq +bin/setup system:config set workers.queue.worker-queue.port 5672 +bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER +bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD +bin/setup system:config set workers.queue.worker-queue.vhost / +# Create elasticsearch index /var/alchemy/Phraseanet/bin/console searchengine:index -c ## enable API and disable ssl on it