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 diff --git a/lib/Alchemy/Phrasea/Command/Setup/Install.php b/lib/Alchemy/Phrasea/Command/Setup/Install.php index 858aabd35c..4682eda55a 100644 --- a/lib/Alchemy/Phrasea/Command/Setup/Install.php +++ b/lib/Alchemy/Phrasea/Command/Setup/Install.php @@ -55,12 +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('download-path', null, InputOption::VALUE_OPTIONAL, 'Path to download repository', __DIR__ . '/../../../../../tmp/download') - ->addOption('lazaret-path', null, InputOption::VALUE_OPTIONAL, 'Path to lazaret repository', __DIR__ . '/../../../../../tmp/lazaret') - ->addOption('caption-path', null, InputOption::VALUE_OPTIONAL, 'Path to caption repository', __DIR__ . '/../../../../../tmp/caption') - ->addOption('scheduler-locks-path', null, InputOption::VALUE_OPTIONAL, 'Path to scheduler-locks repository', __DIR__ . '/../../../../../tmp/locks') - ->addOption('worker-tmp-files', null, InputOption::VALUE_OPTIONAL, 'Path to worker-tmp-files repository', __DIR__ . '/../../../../../tmp') - ->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; } @@ -80,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'); @@ -156,7 +161,6 @@ class Install extends Command $this->container['phraseanet.installer']->install($email, $password, $abConn, $serverName, $dataPath, $dbConn, $templateName, $this->detectBinaries()); $this->container['conf']->set(['main', 'search-engine', 'options'], $esOptions->toArray()); - $this->defineStorageTmpPath($input); if (null !== $this->getApplication()) { $command = $this->getApplication()->find('crossdomain:generate'); @@ -393,49 +397,6 @@ class Install extends Command return $index; } - private function defineStorageTmpPath(InputInterface $input) - { - $downloadPath = $input->getOption('download-path'); - - if (!is_dir($downloadPath)) { - mkdir($downloadPath, 0755, true); - } - - $lazaretPath = $input->getOption('lazaret-path'); - - if (!is_dir($lazaretPath)) { - mkdir($lazaretPath, 0755, true); - } - - $captionPath = $input->getOption('caption-path'); - - if (!is_dir($captionPath)) { - mkdir($captionPath, 0755, true); - } - - $workerTmpFiles = $input->getOption('worker-tmp-files'); - - if (!is_dir($workerTmpFiles)) { - mkdir($workerTmpFiles, 0755, true); - } - - - $schedulerLocksPath = $input->getOption('scheduler-locks-path'); - - if (!is_dir($schedulerLocksPath)) { - mkdir($schedulerLocksPath, 0755, true); - } - - if (($schedulerLocksPath = realpath($schedulerLocksPath)) === FALSE) { - throw new \InvalidArgumentException(sprintf('Path %s does not exist.', $schedulerLocksPath)); - } - - $this->container['conf']->set(['main', 'storage', 'download'], realpath($downloadPath)); - $this->container['conf']->set(['main', 'storage', 'lazaret'], realpath($lazaretPath)); - $this->container['conf']->set(['main', 'storage', 'caption'], realpath($captionPath)); - $this->container['conf']->set(['main', 'storage', 'worker_tmp_files'], realpath($workerTmpFiles)); - } - private function detectBinaries() { return [ diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index bcb496eb31..cae9285920 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -293,7 +293,7 @@ geocoding-providers: # type: latlng # - # name: Longitude - # type: lng + # type: lon # - # name: Latitude # type: lat diff --git a/package.json b/package.json index 942983d680..00df1ba039 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "normalize-css": "^2.1.0", "npm": "^6.0.0", "npm-modernizr": "^2.8.3", - "phraseanet-production-client": "0.34.162-d", + "phraseanet-production-client": "0.34.168-d", "requirejs": "^2.3.5", "tinymce": "^4.0.28", "underscore": "^1.8.3", diff --git a/yarn.lock b/yarn.lock index 36eb14b768..10d8512899 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7577,10 +7577,10 @@ phraseanet-common@^0.4.5-d: js-cookie "^2.1.0" pym.js "^1.3.1" -phraseanet-production-client@0.34.162-d: - version "0.34.162-d" - resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.162-d.tgz#4bfbb6998bae864f5be2eefba87b07ef06f7e4e6" - integrity sha512-FVXzj0Qi6DQSJnv3LrCiIaEUZ0A1DoOn3kUGPBpgws+EzXS13tFC6W0eLz/gDgw/L9Y82S60gI9s778fadwoew== +phraseanet-production-client@0.34.168-d: + version "0.34.168-d" + resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.168-d.tgz#97adb25a7be0de428b3bcd94650315c84d8d3a20" + integrity sha512-hYkPwqESGbzr2/YG7IZcFfIhom8x5kO1nniEXHonz+KRK4SaYWvJ9bD67ePc8G9VO0EenkRoZX1rRcn5dWLa9w== dependencies: "@mapbox/mapbox-gl-language" "^0.9.2" "@turf/turf" "^5.1.6"