From 1c6705b7221562d7b99080020b12370b723c1459 Mon Sep 17 00:00:00 2001 From: Robert Nasarek Date: Wed, 5 Oct 2022 12:19:48 +0200 Subject: [PATCH] add readme, outsource php-settings --- README.md | 26 ++++++++++++++++++++++++++ docker-compose.yml | 1 + drupal_context/Dockerfile | 16 +--------------- drupal_context/custom-php-settings.ini | 8 ++++++++ 4 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 README.md create mode 100644 drupal_context/custom-php-settings.ini diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f2dba2 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Drupal Performance Stack + +## Stack +* Webserver from nginx-alpine +* Database from postgres-alpine +* Drupal from drupal-fpm-alpine + + with apcu, uploadprogress + + max_execution_time = 60 + + max_input_time = 30 + + max_input_nesting_level = 640 + + max_input_vars = 10000 + + memory_limit = 512M + + upload_max_filesize = 20M + + max_file_uploads = 50 + + post_max_size = 20M + +* Search from solr-slim-buster +* TripleStore from slim-buster +## Start +* Clone Repo with `git clone git@github.com:rnsrk/performance-drupal.git`. +* Rename .example-env to .env and set environment varibles fpr postgres service. +* Get [GraphDB free standalone server](https://graphdb.ontotext.com/). +* Copy zip-file to to /graphdb_context and rename it to "graphdb.zip". +* Start containers with `docker compose up -d`. +* Go to`http://localhost:3001` + diff --git a/docker-compose.yml b/docker-compose.yml index 0bacd73..30490c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,6 +24,7 @@ services: - external volumes: - drupal-data:/opt/drupal + - ./drupal_context/custom-php-settings.ini:/usr/local/etc/php/conf.d/99-custom-settings.ini webserver: image: nginx:1.23-alpine diff --git a/drupal_context/Dockerfile b/drupal_context/Dockerfile index 78948e8..de4355a 100755 --- a/drupal_context/Dockerfile +++ b/drupal_context/Dockerfile @@ -12,18 +12,4 @@ RUN pecl install apcu uploadprogress RUN docker-php-ext-enable apcu uploadprogress # Remove build packages -RUN apk del build-base autoconf - -# Custom PHP settings - -## PHP -RUN { \ - echo 'max_execution_time = 60'; \ - echo 'max_input_time = 30'; \ - echo 'max_input_nesting_level = 640'; \ - echo 'max_input_vars = 10000'; \ - echo 'memory_limit = 512M'; \ - echo 'upload_max_filesize = 20M'; \ - echo 'max_file_uploads = 50'; \ - echo 'post_max_size = 20M'; \ - } > /usr/local/etc/php/conf.d/99-custom-settings.ini; \ No newline at end of file +RUN apk del build-base autoconf \ No newline at end of file diff --git a/drupal_context/custom-php-settings.ini b/drupal_context/custom-php-settings.ini new file mode 100644 index 0000000..d76d0d6 --- /dev/null +++ b/drupal_context/custom-php-settings.ini @@ -0,0 +1,8 @@ +max_execution_time = 60 +max_input_time = 30 +max_input_nesting_level = 640 +max_input_vars = 10000 +memory_limit = 512M +upload_max_filesize = 20M +max_file_uploads = 50 +post_max_size = 20M \ No newline at end of file