diff --git a/Dockerfile b/Dockerfile index 4e5659c5..5c63a795 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg && docker-php-ext-install ldap \ && docker-php-ext-configure gd --with-freetype-dir=usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install gd \ + && docker-php-ext-install opcache \ && cd /var/www && curl -sS https://getcomposer.org/installer | php \ && mv /var/www/composer.phar /usr/local/bin/composer \ && wget https://github.com/BookStackApp/BookStack/archive/v${BOOKSTACK_VERSION}.tar.gz -O ${BOOKSTACK}.tar.gz \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 34a7a17f..00258ac2 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -26,12 +26,12 @@ if [ ! -f "$BOOKSTACK_HOME/.env" ]; then DB_PASSWORD=${DB_PASSWORD:-password} # Cache and session - CACHE_DRIVER=file - SESSION_DRIVER=file + CACHE_DRIVER=${BOOKSTACK_CACHEDRIVER:-file} + SESSION_DRIVER=${BOOKSTACK_SESSIONDRIVER:-file} # If using Memcached, comment the above and uncomment these #CACHE_DRIVER=memcached #SESSION_DRIVER=memcached - QUEUE_DRIVER=sync + QUEUE_DRIVER=${BOOKSTACK_QUEUEDRIVER:-sync} # Memcached settings # If using a UNIX socket path for the host, set the port to 0 @@ -109,6 +109,7 @@ php artisan key:generate php artisan migrate --force + mkdir -p ${BOOKSTACK_HOME}/storage/sessions ${BOOKSTACK_HOME}/storage/cache ${BOOKSTACK_HOME}/storage/views echo "Setting folder permissions for uploads" chown -R www-data:www-data public/uploads && chmod -R 775 public/uploads