merge master

This commit is contained in:
aynsix
2020-04-08 12:14:22 +03:00
5 changed files with 25 additions and 63 deletions

View File

@@ -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.options.namespace $INSTALL_SERVER_NAME
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis /var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis
# RabbitMQ # Bus configuration for scheduler & worker
bin/setup system:config set rabbitmq.server.host rabbitmq bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry
bin/setup system:config set rabbitmq.server.port 5672 bin/setup system:config set workers.queue.worker-queue.host rabbitmq
bin/setup system:config set rabbitmq.server.user $INSTALL_RABBITMQ_USER bin/setup system:config set workers.queue.worker-queue.port 5672
bin/setup system:config set rabbitmq.server.password $INSTALL_RABBITMQ_PASSWORD bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER
bin/setup system:config set rabbitmq.server.vhost / 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 /var/alchemy/Phraseanet/bin/console searchengine:index -c
## enable API and disable ssl on it ## enable API and disable ssl on it

View File

@@ -55,12 +55,9 @@ class Install extends Command
->addOption('es-host', null, InputOption::VALUE_OPTIONAL, 'ElasticSearch server HTTP host', 'localhost') ->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-port', null, InputOption::VALUE_OPTIONAL, 'ElasticSearch server HTTP port', 9200)
->addOption('es-index', null, InputOption::VALUE_OPTIONAL, 'ElasticSearch index name', null) ->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('yes', 'y', InputOption::VALUE_NONE, 'Answer yes to all questions')
->addOption('lazaret-path', null, InputOption::VALUE_OPTIONAL, 'Path to lazaret repository', __DIR__ . '/../../../../../tmp/lazaret') ->setHelp("Phraseanet can only be installed on 64 bits PHP.");
->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');
return $this; return $this;
} }
@@ -80,6 +77,14 @@ class Install extends Command
*/ */
protected function doExecute(InputInterface $input, OutputInterface $output) protected function doExecute(InputInterface $input, OutputInterface $output)
{ {
if(PHP_INT_SIZE !== 8) {
$output->writeln(sprintf(
"<error>Phraseanet can only be installed on 64 bits PHP, your version is %d bits (PHP_INT_SIZE=%d).</error>",
PHP_INT_SIZE<<3,PHP_INT_SIZE
));
return -1;
}
/** @var DialogHelper $dialog */ /** @var DialogHelper $dialog */
$dialog = $this->getHelperSet()->get('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['phraseanet.installer']->install($email, $password, $abConn, $serverName, $dataPath, $dbConn, $templateName, $this->detectBinaries());
$this->container['conf']->set(['main', 'search-engine', 'options'], $esOptions->toArray()); $this->container['conf']->set(['main', 'search-engine', 'options'], $esOptions->toArray());
$this->defineStorageTmpPath($input);
if (null !== $this->getApplication()) { if (null !== $this->getApplication()) {
$command = $this->getApplication()->find('crossdomain:generate'); $command = $this->getApplication()->find('crossdomain:generate');
@@ -393,49 +397,6 @@ class Install extends Command
return $index; 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() private function detectBinaries()
{ {
return [ return [

View File

@@ -293,7 +293,7 @@ geocoding-providers:
# type: latlng # type: latlng
# - # -
# name: Longitude # name: Longitude
# type: lng # type: lon
# - # -
# name: Latitude # name: Latitude
# type: lat # type: lat

View File

@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0", "normalize-css": "^2.1.0",
"npm": "^6.0.0", "npm": "^6.0.0",
"npm-modernizr": "^2.8.3", "npm-modernizr": "^2.8.3",
"phraseanet-production-client": "0.34.162-d", "phraseanet-production-client": "0.34.168-d",
"requirejs": "^2.3.5", "requirejs": "^2.3.5",
"tinymce": "^4.0.28", "tinymce": "^4.0.28",
"underscore": "^1.8.3", "underscore": "^1.8.3",

View File

@@ -7577,10 +7577,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0" js-cookie "^2.1.0"
pym.js "^1.3.1" pym.js "^1.3.1"
phraseanet-production-client@0.34.162-d: phraseanet-production-client@0.34.168-d:
version "0.34.162-d" version "0.34.168-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.162-d.tgz#4bfbb6998bae864f5be2eefba87b07ef06f7e4e6" resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.168-d.tgz#97adb25a7be0de428b3bcd94650315c84d8d3a20"
integrity sha512-FVXzj0Qi6DQSJnv3LrCiIaEUZ0A1DoOn3kUGPBpgws+EzXS13tFC6W0eLz/gDgw/L9Y82S60gI9s778fadwoew== integrity sha512-hYkPwqESGbzr2/YG7IZcFfIhom8x5kO1nniEXHonz+KRK4SaYWvJ9bD67ePc8G9VO0EenkRoZX1rRcn5dWLa9w==
dependencies: dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2" "@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6" "@turf/turf" "^5.1.6"