diff --git a/docker-compose.yml b/docker-compose.yml index 6f43cdc997..1bcbf9c578 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -165,8 +165,8 @@ services: healthcheck: test: [CMD, curl, -f, http://localhost] volumes: - - ./sourcecode/apis/contentauthor/docker/contentAuthor.conf.template:/etc/nginx/templates/contentAuthor.conf.template:ro - - ./sourcecode/apis/contentauthor/docker/no-security-theatre.conf:/etc/nginx/conf.d/no-security-theatre.conf:ro + - ./sourcecode/apis/contentauthor/docker/nginx/contentAuthor.conf.template:/etc/nginx/templates/contentAuthor.conf.template:ro + - ./sourcecode/apis/contentauthor/docker/nginx/no-security-theatre.conf:/etc/nginx/conf.d/no-security-theatre.conf:ro - ./sourcecode/apis/contentauthor/public:/app/public - ./sourcecode/apis/contentauthor/storage/app:/app/public/h5pstorage - ./sourcecode/apis/contentauthor/vendor/h5p/h5p-editor:/app/public/h5p-editor-php-library:ro diff --git a/sourcecode/apis/contentauthor/Dockerfile b/sourcecode/apis/contentauthor/Dockerfile index 14bed9a47f..58490d8e78 100644 --- a/sourcecode/apis/contentauthor/Dockerfile +++ b/sourcecode/apis/contentauthor/Dockerfile @@ -26,7 +26,7 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME="/tmp" \ COMPOSER_MEMORY_LIMIT=-1 -COPY docker/php.ini $PHP_INI_DIR/conf.d/99-custom.ini +COPY docker/php/php.ini $PHP_INI_DIR/conf.d/99-custom.ini RUN echo "access.log = /dev/null" >> /usr/local/etc/php-fpm.d/www.conf; @@ -136,6 +136,7 @@ RUN set -eux; \ ; COPY docker/php/docker-entrypoint-dev.sh /docker-entrypoint-dev.sh +COPY docker/php/php-dev.ini "$PHP_INI_DIR/conf.d/zz-php-dev.ini" ENTRYPOINT ["/docker-entrypoint-dev.sh"] @@ -147,5 +148,5 @@ FROM nginx:1-alpine AS web ENV PHP_FPM_HOST "localhost:9000" COPY --from=prod /app/public /app/public -COPY docker/no-security-theatre.conf /etc/nginx/conf.d/ -COPY docker/contentAuthor.conf.template /etc/nginx/templates/contentAuthor.conf.template +COPY docker/nginx/no-security-theatre.conf /etc/nginx/conf.d/ +COPY docker/nginx/contentAuthor.conf.template /etc/nginx/templates/contentAuthor.conf.template diff --git a/sourcecode/apis/contentauthor/docker/contentAuthor.conf.template b/sourcecode/apis/contentauthor/docker/nginx/contentAuthor.conf.template similarity index 100% rename from sourcecode/apis/contentauthor/docker/contentAuthor.conf.template rename to sourcecode/apis/contentauthor/docker/nginx/contentAuthor.conf.template diff --git a/sourcecode/apis/contentauthor/docker/no-security-theatre.conf b/sourcecode/apis/contentauthor/docker/nginx/no-security-theatre.conf similarity index 100% rename from sourcecode/apis/contentauthor/docker/no-security-theatre.conf rename to sourcecode/apis/contentauthor/docker/nginx/no-security-theatre.conf diff --git a/sourcecode/apis/contentauthor/docker/php/php-dev.ini b/sourcecode/apis/contentauthor/docker/php/php-dev.ini new file mode 100644 index 0000000000..ba44f41b50 --- /dev/null +++ b/sourcecode/apis/contentauthor/docker/php/php-dev.ini @@ -0,0 +1,7 @@ +xdebug.client_host = host.docker.internal +xdebug.discover_client_host = on +xdebug.idekey = PHPSTORM +xdebug.mode = develop,debug,profile +xdebug.output_dir = "${PWD}/profiles" +xdebug.profiler_output_name = "cachegrind.out.%u" +xdebug.start_with_request = trigger diff --git a/sourcecode/apis/contentauthor/docker/php.ini b/sourcecode/apis/contentauthor/docker/php/php.ini similarity index 100% rename from sourcecode/apis/contentauthor/docker/php.ini rename to sourcecode/apis/contentauthor/docker/php/php.ini diff --git a/sourcecode/apis/contentauthor/docker/run-phpunit.sh b/sourcecode/apis/contentauthor/docker/run-phpunit.sh deleted file mode 100755 index 5b47ee46bd..0000000000 --- a/sourcecode/apis/contentauthor/docker/run-phpunit.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -eux - -rm -rf /storage/* -mkdir -p /storage/config /storage/storage /storage/storage/app /storage/storage/logs /storage/storage/framework /storage/storage/framework/cache /storage/storage/framework/sessions /app/storage /app/storage/framework /app/storage/framework/views /storage/storage/app/images /storage/storage/app/fonts - -rm -f /storage/test-report.xml -cd /app -vendor/bin/phpunit -c phpunit.xml -d memory_limit=2048M --log-junit /storage/test-report.xml --cache-result-file /dev/null - -if [ ${DUMP_LOG:="false"} = "true" ]; then - cat storage/logs/laravel.log -fi diff --git a/sourcecode/apis/contentauthor/profiles/.gitignore b/sourcecode/apis/contentauthor/profiles/.gitignore new file mode 100644 index 0000000000..8ef289b2dd --- /dev/null +++ b/sourcecode/apis/contentauthor/profiles/.gitignore @@ -0,0 +1 @@ +cachegrind.out.*