mirror of
https://github.com/friendica/docker
synced 2025-04-01 08:37:23 +02:00
Adding Cache-Options
- Cache-Driver (env CACHE_DRIVER) - memcache (env MEMCACHE_HOST, MEMCACHE_PORT) - memcached (env MEMCACHED_HOSTS) - reds (env REDIS_HOST, REDIS_PORT) - Added some doku - Added some example docker-compose files (mariadb-cron-redis)
This commit is contained in:
parent
951fdf7773
commit
1281654f27
25 changed files with 299 additions and 11 deletions
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -11,6 +11,10 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- db.env
|
- db.env
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
restart: always
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: friendica/server:apache
|
image: friendica/server:apache
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -18,6 +22,8 @@ services:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- AUTOINSTALL=true
|
- AUTOINSTALL=true
|
||||||
|
- CACHE_DRIVER=redis
|
||||||
|
- REDIS_HOST=redis
|
||||||
- MAILNAME=
|
- MAILNAME=
|
||||||
- TZ=
|
- TZ=
|
||||||
- LANGUAGE=
|
- LANGUAGE=
|
||||||
|
@ -37,6 +43,8 @@ services:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
environment:
|
environment:
|
||||||
|
- CACHE_DRIVER=redis
|
||||||
|
- REDIS_HOST=redis
|
||||||
- MAILNAME=
|
- MAILNAME=
|
||||||
- TZ=
|
- TZ=
|
||||||
- LANGUAGE=
|
- LANGUAGE=
|
|
@ -11,6 +11,10 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- db.env
|
- db.env
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
restart: always
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: friendica/server:fpm-alpine
|
image: friendica/server:fpm-alpine
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -18,6 +22,8 @@ services:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- AUTOINSTALL=true
|
- AUTOINSTALL=true
|
||||||
|
- CACHE_DRIVER=redis
|
||||||
|
- REDIS_HOST=redis
|
||||||
- MAILNAME=
|
- MAILNAME=
|
||||||
- TZ=
|
- TZ=
|
||||||
- LANGUAGE=
|
- LANGUAGE=
|
||||||
|
@ -35,6 +41,8 @@ services:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
environment:
|
environment:
|
||||||
|
- CACHE_DRIVER=redis
|
||||||
|
- REDIS_HOST=redis
|
||||||
- MAILNAME=
|
- MAILNAME=
|
||||||
- TZ=
|
- TZ=
|
||||||
- LANGUAGE=
|
- LANGUAGE=
|
|
@ -11,6 +11,10 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- db.env
|
- db.env
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
restart: always
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: friendica/server:fpm
|
image: friendica/server:fpm
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -18,6 +22,8 @@ services:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
environment:
|
environment:
|
||||||
- AUTOINSTALL=true
|
- AUTOINSTALL=true
|
||||||
|
- CACHE_DRIVER=redis
|
||||||
|
- REDIS_HOST=redis
|
||||||
- MAILNAME=
|
- MAILNAME=
|
||||||
- TZ=
|
- TZ=
|
||||||
- LANGUAGE=
|
- LANGUAGE=
|
||||||
|
@ -34,6 +40,8 @@ services:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
environment:
|
environment:
|
||||||
|
- CACHE_DRIVER=redis
|
||||||
|
- REDIS_HOST=redis
|
||||||
- MAILNAME=
|
- MAILNAME=
|
||||||
- TZ=
|
- TZ=
|
||||||
- LANGUAGE=
|
- LANGUAGE=
|
|
@ -38,6 +38,7 @@ RUN set -ex; \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
|
libmemcached-dev \
|
||||||
libgraphicsmagick1-dev \
|
libgraphicsmagick1-dev \
|
||||||
libfreetype6 \
|
libfreetype6 \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
|
@ -60,6 +61,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
||||||
; \
|
; \
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-3.0.4; \
|
||||||
|
pecl install redis-3.1.6; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
apt-mark auto '.*' > /dev/null; \
|
apt-mark auto '.*' > /dev/null; \
|
||||||
apt-mark manual $savedAptMark; \
|
apt-mark manual $savedAptMark; \
|
||||||
|
|
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -31,6 +31,8 @@ RUN set -ex; \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
libmcrypt \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
libpng \
|
libpng \
|
||||||
libjpeg-turbo-dev \
|
libjpeg-turbo-dev \
|
||||||
|
@ -55,6 +57,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
||||||
\
|
\
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-3.0.4; \
|
||||||
|
pecl install redis-3.1.6; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||||
| tr ',' '\n' \
|
| tr ',' '\n' \
|
||||||
|
|
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -38,6 +38,7 @@ RUN set -ex; \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
|
libmemcached-dev \
|
||||||
libgraphicsmagick1-dev \
|
libgraphicsmagick1-dev \
|
||||||
libfreetype6 \
|
libfreetype6 \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
|
@ -60,6 +61,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
||||||
; \
|
; \
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-3.0.4; \
|
||||||
|
pecl install redis-3.1.6; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
apt-mark auto '.*' > /dev/null; \
|
apt-mark auto '.*' > /dev/null; \
|
||||||
apt-mark manual $savedAptMark; \
|
apt-mark manual $savedAptMark; \
|
||||||
|
|
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -38,6 +38,7 @@ RUN set -ex; \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
|
libmemcached-dev \
|
||||||
libgraphicsmagick1-dev \
|
libgraphicsmagick1-dev \
|
||||||
libfreetype6 \
|
libfreetype6 \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
|
@ -60,6 +61,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
||||||
; \
|
; \
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-3.0.4; \
|
||||||
|
pecl install redis-3.1.6; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
apt-mark auto '.*' > /dev/null; \
|
apt-mark auto '.*' > /dev/null; \
|
||||||
apt-mark manual $savedAptMark; \
|
apt-mark manual $savedAptMark; \
|
||||||
|
|
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -31,6 +31,8 @@ RUN set -ex; \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
libmcrypt \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
libpng \
|
libpng \
|
||||||
libjpeg-turbo-dev \
|
libjpeg-turbo-dev \
|
||||||
|
@ -55,6 +57,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
||||||
\
|
\
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-3.0.4; \
|
||||||
|
pecl install redis-3.1.6; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||||
| tr ',' '\n' \
|
| tr ',' '\n' \
|
||||||
|
|
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -38,6 +38,7 @@ RUN set -ex; \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
|
libmemcached-dev \
|
||||||
libgraphicsmagick1-dev \
|
libgraphicsmagick1-dev \
|
||||||
libfreetype6 \
|
libfreetype6 \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
|
@ -60,6 +61,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
||||||
; \
|
; \
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-3.0.4; \
|
||||||
|
pecl install redis-3.1.6; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
apt-mark auto '.*' > /dev/null; \
|
apt-mark auto '.*' > /dev/null; \
|
||||||
apt-mark manual $savedAptMark; \
|
apt-mark manual $savedAptMark; \
|
||||||
|
|
|
@ -110,4 +110,28 @@ $a->config['system']['auth_cookie_lifetime'] = 7;
|
||||||
if (!empty(getenv('VALIDATION'))) {
|
if (!empty(getenv('VALIDATION'))) {
|
||||||
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_url_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
$a->config['system']['disable_email_validation'] = strtolower(getenv('VALIDATION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('CACHE_DRIVER'))) {
|
||||||
|
$a->config['system']['cache_driver'] = strtolower(getenv('CACHE_DRIVER'));
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_HOST'))) {
|
||||||
|
$a->config['system']['redis_host'] = getenv('REDIS_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('REDIS_PORT'))) {
|
||||||
|
$a->config['system']['redis_port'] = getenv('REDIS_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_HOST'))) {
|
||||||
|
$a->config['system']['memcache_host'] = getenv('MEMCACHE_HOST');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHE_PORT'))) {
|
||||||
|
$a->config['system']['memcache_port'] = getenv('MEMCACHE_PORT');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty(getenv('MEMCACHED_HOSTS'))) {
|
||||||
|
$a->config['system']['memcached_hosts'] = getenv('MEMCACHED_HOSTS');
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -30,6 +30,8 @@ RUN set -ex; \
|
||||||
libtool \
|
libtool \
|
||||||
libmcrypt \
|
libmcrypt \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
cyrus-sasl-dev \
|
||||||
freetype \
|
freetype \
|
||||||
libpng \
|
libpng \
|
||||||
libjpeg-turbo-dev \
|
libjpeg-turbo-dev \
|
||||||
|
@ -54,6 +56,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt; \
|
||||||
\
|
\
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
||||||
|
pecl install redis-%%REDIS_VERSION%%; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
runDeps="$( \
|
runDeps="$( \
|
||||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||||
| tr ',' '\n' \
|
| tr ',' '\n' \
|
||||||
|
|
|
@ -37,6 +37,7 @@ RUN set -ex; \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
libmagick++-dev \
|
libmagick++-dev \
|
||||||
|
libmemcached-dev \
|
||||||
libgraphicsmagick1-dev \
|
libgraphicsmagick1-dev \
|
||||||
libfreetype6 \
|
libfreetype6 \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
|
@ -59,6 +60,15 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
docker-php-ext-install -j 4 curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype json iconv mcrypt \
|
||||||
; \
|
; \
|
||||||
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
|
pecl install memcached-%%MEMCACHED_VERSION%%; \
|
||||||
|
pecl install redis-%%REDIS_VERSION%%; \
|
||||||
|
\
|
||||||
|
docker-php-ext-enable \
|
||||||
|
memcached \
|
||||||
|
redis \
|
||||||
|
; \
|
||||||
|
\
|
||||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||||
apt-mark auto '.*' > /dev/null; \
|
apt-mark auto '.*' > /dev/null; \
|
||||||
apt-mark manual $savedAptMark; \
|
apt-mark manual $savedAptMark; \
|
||||||
|
|
31
README.md
31
README.md
|
@ -69,19 +69,19 @@ There are three options to enable the cron-job for Friendica:
|
||||||
This is the full list of all possible environment variables used for this image:
|
This is the full list of all possible environment variables used for this image:
|
||||||
|
|
||||||
**Common**
|
**Common**
|
||||||
- `MAILNAME` E-Mail address of the administrator (**required**)
|
- `MAILNAME` E-Mail address of the administrator. (**required**)
|
||||||
- `TZ` The default localization of the Friendica server (Default: `America/Los_Angeles`)
|
- `TZ` The default localization of the Friendica server. (Default: `America/Los_Angeles`)
|
||||||
- `LANGUAGE` The default language of the Friendica server (Default: `en`)
|
- `LANGUAGE` The default language of the Friendica server. (Default: `en`)
|
||||||
- `SITENAME` The default name of the Friendica server (Default: `Friendica Social Network` )
|
- `SITENAME` The default name of the Friendica server. (Default: `Friendica Social Network` )
|
||||||
- `VALIDATION` The default setting if url/emails are getting validated (Default: `true`)
|
- `VALIDATION` The default setting if url/emails are getting validated. (Default: `true`)
|
||||||
- `AUTOINSTALL` if `true`, the automatic configuration will start (Default: `false`)
|
- `AUTOINSTALL` if `true`, the automatic configuration will start. (Default: `false`)
|
||||||
|
|
||||||
**SMTP/Mail**
|
**SMTP/Mail**
|
||||||
- `SMTP` address of the SMTP Mail-Gateway (**required** - Default: `localhost`)
|
- `SMTP` Address of the SMTP Mail-Gateway. (**required** - Default: `localhost`)
|
||||||
- `SMTP_FROM` sender user-part of the address (Default: `no-reply` - e.g. no-reply@friendica.local)
|
- `SMTP_FROM` Sender user-part of the address. (Default: `no-reply` - e.g. no-reply@friendica.local)
|
||||||
- `SMTP_AUTH_USER` Username for the SMTP Mail-Gateway (Default: empty)
|
- `SMTP_AUTH_USER` Username for the SMTP Mail-Gateway. (Default: empty)
|
||||||
- `SMTP_AUTH_PASS` Password for the SMTP Mail-Gateway (Default: empty)
|
- `SMTP_AUTH_PASS` Password for the SMTP Mail-Gateway. (Default: empty)
|
||||||
- `SMTP_AUTH_METHOD` Authentication method for the SMTP Mail-Gateway (Default: empty/plain text)
|
- `SMTP_AUTH_METHOD` Authentication method for the SMTP Mail-Gateway. (Default: empty/plain text)
|
||||||
|
|
||||||
**Database** (**required**)
|
**Database** (**required**)
|
||||||
- `MYSQL_USERNAME` Username for the database user using mysql.
|
- `MYSQL_USERNAME` Username for the database user using mysql.
|
||||||
|
@ -91,6 +91,15 @@ This is the full list of all possible environment variables used for this image:
|
||||||
- `MYSQL_HOST` Hostname of the database server using mysql / mariadb.
|
- `MYSQL_HOST` Hostname of the database server using mysql / mariadb.
|
||||||
- `MYSQL_PORT` Port of the database server using mysql / mariadb.
|
- `MYSQL_PORT` Port of the database server using mysql / mariadb.
|
||||||
|
|
||||||
|
**Caching**
|
||||||
|
- `CACHE_DRIVER` Driver of the Friendica cache (`memcache`, `memcached` or `redis`)
|
||||||
|
- `MEMCACHE_HOST` Host of the memcache cache server. (Default: `127.0.0.1`)
|
||||||
|
- `MEMCACHE_PORT` Port of the memcache cache server. (Default: `11211`)
|
||||||
|
- `MEMCACHED_HOSTS` Hosts of the memcached cache server. (Default: `[['127.0.0.1', 11211]]`)
|
||||||
|
- `REDIS_HOST` Host of the redis cache server. (Default: `127.0.0.1`)
|
||||||
|
- `REDIS_PORT` Port of the redis cache server. (Default: `6379`)
|
||||||
|
|
||||||
|
|
||||||
## Administrator account
|
## Administrator account
|
||||||
|
|
||||||
Because Friendica links the administrator account to a specific mail address, you **have** to set a valid address for `MAILNAME`.
|
Because Friendica links the administrator account to a specific mail address, you **have** to set a valid address for `MAILNAME`.
|
||||||
|
|
|
@ -25,6 +25,8 @@ declare -A extras=(
|
||||||
|
|
||||||
declare -A pecl_versions=(
|
declare -A pecl_versions=(
|
||||||
[Imagick]='3.4.3'
|
[Imagick]='3.4.3'
|
||||||
|
[memcached]='3.0.4'
|
||||||
|
[redis]='3.1.6'
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -A install_extras=(
|
declare -A install_extras=(
|
||||||
|
@ -73,6 +75,8 @@ function create_variant() {
|
||||||
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
|
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
|
||||||
s|%%INSTALL_EXTRAS%%|'"${install_extras[$install_type]}"'|g;
|
s|%%INSTALL_EXTRAS%%|'"${install_extras[$install_type]}"'|g;
|
||||||
s/%%IMAGICK_VERSION%%/'"${pecl_versions[Imagick]}"'/g;
|
s/%%IMAGICK_VERSION%%/'"${pecl_versions[Imagick]}"'/g;
|
||||||
|
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
||||||
|
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
||||||
' "$dir/Dockerfile"
|
' "$dir/Dockerfile"
|
||||||
|
|
||||||
# Copy the shell scripts
|
# Copy the shell scripts
|
||||||
|
|
Loading…
Add table
Reference in a new issue