mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge branch 'master' into PHRAS-2933_Fix_sort_facet
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -36,7 +36,11 @@ RUN apt-get update \
|
|||||||
xpdf \
|
xpdf \
|
||||||
&& update-locale "LANG=fr_FR.UTF-8 UTF-8" \
|
&& update-locale "LANG=fr_FR.UTF-8 UTF-8" \
|
||||||
&& dpkg-reconfigure --frontend noninteractive locales \
|
&& dpkg-reconfigure --frontend noninteractive locales \
|
||||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||||
|
&& docker-php-source extract \
|
||||||
&& docker-php-ext-install -j$(nproc) gd \
|
&& docker-php-ext-install -j$(nproc) gd \
|
||||||
&& docker-php-ext-install zip exif iconv mbstring pcntl sockets xsl intl pdo_mysql gettext bcmath mcrypt \
|
&& docker-php-ext-install zip exif iconv mbstring pcntl sockets xsl intl pdo_mysql gettext bcmath mcrypt \
|
||||||
&& pecl install redis amqp-1.9.3 zmq-beta imagick-beta \
|
&& pecl install redis amqp-1.9.3 zmq-beta imagick-beta \
|
||||||
@@ -126,6 +130,12 @@ RUN mkdir -p /var/alchemy/Phraseanet/logs \
|
|||||||
|
|
||||||
FROM phraseanet-system as phraseanet-fpm
|
FROM phraseanet-system as phraseanet-fpm
|
||||||
|
|
||||||
|
RUN docker-php-source extract \
|
||||||
|
&& pecl install xdebug-2.9.0 \
|
||||||
|
&& docker-php-ext-enable xdebug \
|
||||||
|
#&& pecl clear-cache \
|
||||||
|
&& docker-php-source delete
|
||||||
|
|
||||||
COPY --from=builder --chown=app /var/alchemy /var/alchemy/Phraseanet
|
COPY --from=builder --chown=app /var/alchemy /var/alchemy/Phraseanet
|
||||||
ADD ./docker/phraseanet/ /
|
ADD ./docker/phraseanet/ /
|
||||||
WORKDIR /var/alchemy/Phraseanet
|
WORKDIR /var/alchemy/Phraseanet
|
||||||
|
@@ -14,4 +14,4 @@ else
|
|||||||
runuser app -c '/auto-install.sh'
|
runuser app -c '/auto-install.sh'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
php-fpm
|
php-fpm -F
|
||||||
|
@@ -4,5 +4,16 @@ set -e
|
|||||||
|
|
||||||
envsubst < /php.ini.sample > /usr/local/etc/php/php.ini
|
envsubst < /php.ini.sample > /usr/local/etc/php/php.ini
|
||||||
envsubst < /php-fpm.conf.sample > /usr/local/etc/php-fpm.conf
|
envsubst < /php-fpm.conf.sample > /usr/local/etc/php-fpm.conf
|
||||||
|
echo "XDEBUG=$XDEBUG"
|
||||||
|
if [ $XDEBUG = "ON" ]; then
|
||||||
|
echo "XDEBUG IS ENABLED. YOU MAY KEEP THIS FEATURE DISABLED IN PRODUCTION."
|
||||||
|
echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
echo "xdebug.remote_host=$XDEBUG_SERVER" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
echo "xdebug.remote_port=$XDEBUG_REMOTE_PORT" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
echo "xdebug.remote_connect_back=0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
#echo "xdebug.idekey=11896" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
fi
|
||||||
|
|
||||||
bash -e docker-php-entrypoint $@
|
bash -e docker-php-entrypoint $@
|
||||||
|
@@ -15,6 +15,7 @@ use Alchemy\Phrasea\Application;
|
|||||||
use Alchemy\Phrasea\Command\Command;
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Alchemy\Phrasea\Model\Entities\User;
|
use Alchemy\Phrasea\Model\Entities\User;
|
||||||
|
use Alchemy\Phrasea\Plugin\Plugin;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\HttpKernel\Client;
|
use Symfony\Component\HttpKernel\Client;
|
||||||
@@ -30,6 +31,15 @@ class JsFixtures extends Command
|
|||||||
|
|
||||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
|
/** @var Plugin $plugin */
|
||||||
|
$msg = [];
|
||||||
|
foreach($this->container['plugins.manager']->listPlugins() as $plugin) {
|
||||||
|
$msg[] = sprintf(" bin/setup plugins:remove \"%s\"", $plugin->getName());
|
||||||
|
}
|
||||||
|
if(count($msg) !== 0) {
|
||||||
|
throw new RuntimeException("You must remove plugins first:\n" . join("\n", $msg));
|
||||||
|
}
|
||||||
|
|
||||||
if (!file_exists($this->container['db.fixture.info']['path'])) {
|
if (!file_exists($this->container['db.fixture.info']['path'])) {
|
||||||
throw new RuntimeException('You must generate sqlite db first, run "bin/developer phraseanet:regenerate-sqlite" command.');
|
throw new RuntimeException('You must generate sqlite db first, run "bin/developer phraseanet:regenerate-sqlite" command.');
|
||||||
}
|
}
|
||||||
@@ -104,6 +114,7 @@ class JsFixtures extends Command
|
|||||||
private function writeResponse(OutputInterface $output, $method, $path, $to, $authenticateUser = false)
|
private function writeResponse(OutputInterface $output, $method, $path, $to, $authenticateUser = false)
|
||||||
{
|
{
|
||||||
$environment = Application::ENV_TEST;
|
$environment = Application::ENV_TEST;
|
||||||
|
/** @var Application $app */
|
||||||
$app = require __DIR__ . '/../../Application/Root.php';
|
$app = require __DIR__ . '/../../Application/Root.php';
|
||||||
$app['orm.em'] = $app->extend('orm.em', function($em, $app) {
|
$app['orm.em'] = $app->extend('orm.em', function($em, $app) {
|
||||||
return $app['orm.ems'][$app['db.fixture.hash.key']];
|
return $app['orm.ems'][$app['db.fixture.hash.key']];
|
||||||
|
Reference in New Issue
Block a user