From 3bff37bcd2e48397f5ec9218c01c3e1b82733892 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 14 Nov 2022 07:08:18 +0200 Subject: [PATCH 1/3] Install from composer.json --- Dockerfile | 5 ++++- composer.json | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 composer.json diff --git a/Dockerfile b/Dockerfile index 1787187..aa33951 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,13 @@ COPY --from=composer/composer:2-bin /composer /usr/local/bin/ ENV DRUPAL_VERSION 10.0.0-beta2 WORKDIR /opt/drupal + +COPY composer.json . + # Copy from the official image when Drupal 10.0 will be released RUN set -eux; \ export COMPOSER_HOME="$(mktemp -d)"; \ - composer create-project --no-interaction "drupal/recommended-project:$DRUPAL_VERSION" ./; \ + composer install --no-interaction --no-progress; \ chown -R www-data:www-data web/sites web/modules web/themes; \ rm -rf /app/public; \ ln -sf /opt/drupal/web /app/public; \ diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..4f28f7e --- /dev/null +++ b/composer.json @@ -0,0 +1,61 @@ +{ + "name": "dunglas/frankenphp-drupal", + "description": "Drupal 10 with FrankenPHP", + "type": "project", + "license": "MIT", + "homepage": "https://github.com/dunglas/frankenphp-drupal", + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "php": "^8.2", + "composer-runtime-api": "^2", + "composer/installers": "^2.0", + "drupal/core-composer-scaffold": "^10.0", + "drupal/core-recommended": "^10.0", + "el7cosmos/drupal-runtime": "*", + "runtime/frankenphp-symfony": "^0.1.0" + }, + "conflict": { + "drupal/drupal": "*" + }, + "config": { + "optimize-autoloader": true, + "sort-packages": true, + "allow-plugins": { + "composer/installers": true, + "drupal/core-composer-scaffold": true, + "symfony/runtime": true + } + }, + "extra": { + "drupal-scaffold": { + "allowed-packages": [ + "drupal/core", + "el7cosmos/drupal-runtime" + ], + "locations": { + "web-root": "./web" + } + }, + "installer-paths": { + "web/core": ["type:drupal-core"], + "web/libraries/{$name}": ["type:drupal-library", "type:bower-asset", "type:npm-asset"], + "web/modules/contrib/{$name}": ["type:drupal-module"], + "web/modules/custom/{$name}": ["type:drupal-module-custom"], + "web/profiles/{$name}": ["type:drupal-profile"], + "web/themes/contrib/{$name}": ["type:drupal-theme"], + "web/themes/custom/{$name}": ["type:drupal-theme-custom"], + "drush/{$name}": ["type:drupal-drush"] + }, + "runtime": { + "autoload_template": "vendor/el7cosmos/drupal-runtime/assets/autoload_runtime.template", + "class": "Runtime\\FrankenPhpSymfony\\Runtime" + } + }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ] +} From f6029ca111efa986c9e9d7f12a38bcd86d9fd691 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 14 Nov 2022 07:08:54 +0200 Subject: [PATCH 2/3] Both images are build --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20cb3c9..9c054da 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ the modern app server for PHP. ``` git clone https://github.com/dunglas/frankenphp-drupal cd frankenphp-drupal -docker compose pull --include-deps +docker compose build --pull docker compose up ``` From 55b31df916ef74de236d8c3e789537bb6e54a177 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 14 Nov 2022 07:44:39 +0200 Subject: [PATCH 3/3] FRANKENPHP_CONFIG in docker-compose.yml --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index fc31bee..eb58b83 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,8 @@ services: # existing content of the image at the same location - /app/public/sites restart: always + environment: + FRANKENPHP_CONFIG: "worker ./web/index.php" postgres: build: