mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Added memcached to php docker image
This commit is contained in:
parent
7781f07352
commit
29fd313337
@ -35,6 +35,18 @@ RUN docker-php-ext-configure redis\
|
|||||||
# cleanup
|
# cleanup
|
||||||
RUN rm /tmp/phpredis.tar.gz
|
RUN rm /tmp/phpredis.tar.gz
|
||||||
|
|
||||||
|
# Install memcached extension
|
||||||
|
RUN apk add --no-cache --virtual cyrus-sasl-dev
|
||||||
|
RUN apk add --no-cache --virtual libmemcached-dev
|
||||||
|
ADD https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz /tmp/memcached.tar.gz
|
||||||
|
RUN mkdir -p /usr/src/php/ext/memcached\
|
||||||
|
&& tar xf /tmp/memcached.tar.gz -C /usr/src/php/ext/memcached --strip-components=1
|
||||||
|
# configure and install
|
||||||
|
RUN docker-php-ext-configure memcached\
|
||||||
|
&& docker-php-ext-install memcached
|
||||||
|
# cleanup
|
||||||
|
RUN rm /tmp/memcached.tar.gz
|
||||||
|
|
||||||
# Install APCu extension
|
# Install APCu extension
|
||||||
ADD https://pecl.php.net/get/apcu-5.1.3.tgz /tmp/apcu.tar.gz
|
ADD https://pecl.php.net/get/apcu-5.1.3.tgz /tmp/apcu.tar.gz
|
||||||
RUN mkdir -p /usr/src/php/ext/apcu\
|
RUN mkdir -p /usr/src/php/ext/apcu\
|
||||||
|
@ -272,6 +272,12 @@ class InstallCommand extends Command
|
|||||||
$config['entity_manager']['connection']['user'] = $params['DATABASE']['USER'];
|
$config['entity_manager']['connection']['user'] = $params['DATABASE']['USER'];
|
||||||
$config['entity_manager']['connection']['password'] = $params['DATABASE']['PASSWORD'];
|
$config['entity_manager']['connection']['password'] = $params['DATABASE']['PASSWORD'];
|
||||||
$config['entity_manager']['connection']['dbname'] = $params['DATABASE']['NAME'];
|
$config['entity_manager']['connection']['dbname'] = $params['DATABASE']['NAME'];
|
||||||
|
|
||||||
|
if ($params['DATABASE']['DRIVER'] === 'pdo_mysql') {
|
||||||
|
$config['entity_manager']['connection']['driverOptions'] = [
|
||||||
|
\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
@ -47,8 +47,8 @@ class InstallCommandTest extends TestCase
|
|||||||
|
|
||||||
protected function createInputStream()
|
protected function createInputStream()
|
||||||
{
|
{
|
||||||
$stream = fopen('php://memory', 'r+', false);
|
$stream = fopen('php://memory', 'rb+', false);
|
||||||
fputs($stream, <<<CLI_INPUT
|
fwrite($stream, <<<CLI_INPUT
|
||||||
|
|
||||||
shlink_db
|
shlink_db
|
||||||
alejandro
|
alejandro
|
||||||
@ -69,7 +69,7 @@ CLI_INPUT
|
|||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function testInputIsProperlyParsed()
|
public function inputIsProperlyParsed()
|
||||||
{
|
{
|
||||||
$this->configWriter->toFile(Argument::any(), [
|
$this->configWriter->toFile(Argument::any(), [
|
||||||
'app_options' => [
|
'app_options' => [
|
||||||
@ -81,6 +81,9 @@ CLI_INPUT
|
|||||||
'dbname' => 'shlink_db',
|
'dbname' => 'shlink_db',
|
||||||
'user' => 'alejandro',
|
'user' => 'alejandro',
|
||||||
'password' => '1234',
|
'password' => '1234',
|
||||||
|
'driverOptions' => [
|
||||||
|
\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'translator' => [
|
'translator' => [
|
||||||
|
Loading…
Reference in New Issue
Block a user