diff --git a/.docker/vhost.conf b/.docker/vhost.conf index 32c11a59..1e2e9e52 100644 --- a/.docker/vhost.conf +++ b/.docker/vhost.conf @@ -1,4 +1,3 @@ -# @see https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/ server { listen 80; server_name localhost; @@ -16,9 +15,7 @@ server { access_log off; } - # Very rarely should these ever be accessed outside of your lan location ~* \.(txt|log)$ { - allow 192.168.0.0/16; deny all; } @@ -35,11 +32,6 @@ server { deny all; } - # Allow "Well-Known URIs" as per RFC 5785 - location ~* ^/.well-known/ { - allow all; - } - # Block access to "hidden" files and directories whose names begin with a # period. This includes directories used by version control systems such # as Subversion or Git to store control files. @@ -48,8 +40,7 @@ server { } location / { - # try_files $uri @rewrite; # For Drupal <= 6 - try_files $uri /index.php?$query_string; # For Drupal >= 7 + try_files $uri /index.php?$query_string; } location @rewrite { @@ -62,41 +53,26 @@ server { return 404; } - # In Drupal 8, we must also match new paths where the '.php' appears in - # the middle, such as update.php/selection. The rule we use is strict, - # and only allows this pattern with the update.php front controller. - # This allows legacy path aliases in the form of - # blog/index.php/legacy-path to continue to route to Drupal nodes. If - # you do not have any paths like that, then you might prefer to use a - # laxer rule, such as: - # location ~ \.php(/|$) { - # The laxer rule will continue to work if Drupal uses this new URL - # pattern with front controllers other than update.php in a future - # release. location ~ '\.php$|^/update.php' { fastcgi_split_path_info ^(.+?\.php)(|/.*)$; - # Security note: If you're running a version of PHP older than the - # latest 5.3, you should have "cgi.fix_pathinfo = 0;" in php.ini. - # See http://serverfault.com/q/627903/94922 for details. include fastcgi_params; - # Block httpoxy attacks. See https://httpoxy.org/. + fastcgi_param HTTP_PROXY ""; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param QUERY_STRING $query_string; + fastcgi_intercept_errors on; fastcgi_pass phpfpm:9000; } - # Fighting with Styles? This little gem is amazing. - # location ~ ^/sites/.*/files/imagecache/ { # For Drupal <= 6 - location ~ ^/sites/.*/files/styles/ { # For Drupal >= 7 + location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } # Handle private files through Drupal. Private file's path can come # with a language prefix. - location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7 + location ~ ^(/[a-z\-]+)?/system/files/ { try_files $uri /index.php?$query_string; } diff --git a/.gitignore b/.gitignore index 3e4dbe47..240fd773 100644 --- a/.gitignore +++ b/.gitignore @@ -146,6 +146,7 @@ /web/sites/*/private /web/sites/*/files-public /web/sites/*/files-private +/private # Ignore paths that may contain temporary files /web/sites/*/translations @@ -213,3 +214,4 @@ yarn-error.log config/sync/**/maestro.maestro_template.* config/sync/**/webform.webform_options.* config/sync/**/webform.webform.* + diff --git a/README.md b/README.md index 3b15809a..496fc24c 100644 --- a/README.md +++ b/README.md @@ -38,35 +38,10 @@ local machine for development and testing purposes. docker-compose exec phpfpm composer install --no-interaction ``` - **Note**: Due to we use - a composer [`post-install-cmd` - script](https://getcomposer.org/doc/articles/scripts.md#command-events) to - apply a patch to the OpenID Connect module (see - [`composer.json`](composer.json) for details). - - When is resolved, this - must be added to `extra.patches` in [`composer.json`](composer.json): - - ```json - { - … - "extra": { - … - "patches": { - … - "drupal/openid_connect": { - "Revoking group access does not reflect on applied roles (https://www.drupal.org/project/openid_connect/issues/3224128)": "https://git.drupalcode.org/project/openid_connect/-/merge_requests/31.diff" - } - … - } - } - } - ``` - 5. Install profile ```sh - docker-compose exec phpfpm vendor/bin/drush site:install os2forms_forloeb_profile --existing-config + docker-compose exec phpfpm vendor/bin/drush site:install os2forms_forloeb_profile --existing-config ``` Should you encounter the following error: @@ -79,7 +54,7 @@ local machine for development and testing purposes. Proceed to remove this entry from the db via the sql cli: ```sh - itkdev-docker-compose vendor/bin/drush sql:query 'DELETE FROM config WHERE name="config_entity_revisions.config_entity_revisions_type.webform_revisions";' + docker-compose exec phpfpm vendor/bin/drush sql:query 'DELETE FROM config WHERE name="config_entity_revisions.config_entity_revisions_type.webform_revisions";' ``` Afterwards, run config-import to import config from files: diff --git a/composer.json b/composer.json index a9c2eb85..81d41841 100644 --- a/composer.json +++ b/composer.json @@ -73,7 +73,7 @@ "drupal/core-project-message": "^9.1", "drupal/core-recommended": "^9.1", "drupal/key_auth": "^2.0", - "drupal/maestro": "dev-3.x as 3.0.1-rc2", + "drupal/maestro": "^3.0", "drupal/memcache": "^2.3", "drupal/menu_link_attributes": "^1.2", "drupal/openid_connect": "^2.0", @@ -83,10 +83,10 @@ "itk-dev/getorganized-api-client-php": "^1.0", "itk-dev/os2forms_cpr_lookup": "^1.6.3", "itk-dev/os2forms_cvr_lookup": "^1.1", - "itk-dev/os2forms_digital_post": "dev-develop", - "itk-dev/os2forms_nemlogin_openid_connect": "dev-develop", - "itk-dev/os2forms_user_field_lookup": "dev-develop", - "itk-dev/web_accessibility_statement": "dev-master", + "itk-dev/os2forms_digital_post": "^1.0", + "itk-dev/os2forms_nemlogin_openid_connect": "^1.0", + "itk-dev/os2forms_user_field_lookup": "^1.0", + "itk-dev/web_accessibility_statement": "^1.0", "os2forms/os2forms_forloeb_profile": "^1.8" }, "require-dev": { diff --git a/composer.lock b/composer.lock index a1900e13..cb6b3799 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2a445a33df1e1dc4517fc6c64519803a", + "content-hash": "676054b95d7e05d8e6c05c3a0dde13ba", "packages": [ { "name": "asm89/stack-cors", @@ -4128,11 +4128,17 @@ }, { "name": "drupal/maestro", - "version": "dev-3.x", + "version": "3.0.1-rc4", "source": { "type": "git", "url": "https://git.drupalcode.org/project/maestro.git", - "reference": "ee70d0ec009b7ab57104c79944d35e3a7bfc0690" + "reference": "3.0.1-rc4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/maestro-3.0.1-rc4.zip", + "reference": "3.0.1-rc4", + "shasum": "79068c7b47cbce5a473031940ad551e6df7530c6" }, "require": { "drupal/core": "^8.8 || ^9" @@ -4143,15 +4149,12 @@ }, "type": "drupal-module", "extra": { - "branch-alias": { - "dev-3.x": "3.x-dev" - }, "drupal": { - "version": "3.x-dev", - "datestamp": "1643124375", + "version": "3.0.1-rc4", + "datestamp": "1657119073", "security-coverage": { "status": "not-covered", - "message": "Dev releases are not covered by Drupal security advisories." + "message": "RC releases are not covered by Drupal security advisories." } } }, @@ -4835,26 +4838,26 @@ }, { "name": "drupal/r4032login", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/r4032login.git", - "reference": "2.1.0" + "reference": "2.2.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/r4032login-2.1.0.zip", - "reference": "2.1.0", - "shasum": "2004f3ea4a4d4e0f08cdcd75f6f89c3f58d903fa" + "url": "https://ftp.drupal.org/files/projects/r4032login-2.2.0.zip", + "reference": "2.2.0", + "shasum": "fc0e611d005d1040d19a3448a21875de65afb591" }, "require": { - "drupal/core": "^8.8 || ^9" + "drupal/core": "^9.3 || ^10" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.1.0", - "datestamp": "1615710471", + "version": "2.2.0", + "datestamp": "1649051152", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -8004,16 +8007,16 @@ }, { "name": "itk-dev/os2forms_digital_post", - "version": "dev-develop", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/itk-dev/os2forms_digital_post.git", - "reference": "a023e6a0311560dbbeefe55aceaea27a2abb38e4" + "reference": "d340703f412e2f33a946af1140ae866660f20491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itk-dev/os2forms_digital_post/zipball/a023e6a0311560dbbeefe55aceaea27a2abb38e4", - "reference": "a023e6a0311560dbbeefe55aceaea27a2abb38e4", + "url": "https://api.github.com/repos/itk-dev/os2forms_digital_post/zipball/d340703f412e2f33a946af1140ae866660f20491", + "reference": "d340703f412e2f33a946af1140ae866660f20491", "shasum": "" }, "require": { @@ -8032,7 +8035,6 @@ "drupal/coder": "^8.3", "wsdltophp/packagegenerator": "^4.0" }, - "default-branch": true, "type": "drupal-module", "autoload": { "Drupal\\os2forms_digital_post\\": "src/" @@ -8062,23 +8064,23 @@ ], "description": "Provides integration to Print service provided by Serviceplatformen.", "support": { - "source": "https://github.com/itk-dev/os2forms_digital_post/tree/develop", + "source": "https://github.com/itk-dev/os2forms_digital_post/tree/1.0.0", "issues": "https://github.com/itk-dev/os2forms_digital_post/issues" }, - "time": "2022-06-13T10:36:59+00:00" + "time": "2022-06-29T18:31:41+00:00" }, { "name": "itk-dev/os2forms_nemlogin_openid_connect", - "version": "dev-develop", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/itk-dev/os2forms_nemlogin_openid_connect.git", - "reference": "b223de1adb5653c08e26bccad516c4c548ae12f9" + "reference": "ea9896d8f088f1902be19397bc18b358e3de9991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itk-dev/os2forms_nemlogin_openid_connect/zipball/b223de1adb5653c08e26bccad516c4c548ae12f9", - "reference": "b223de1adb5653c08e26bccad516c4c548ae12f9", + "url": "https://api.github.com/repos/itk-dev/os2forms_nemlogin_openid_connect/zipball/ea9896d8f088f1902be19397bc18b358e3de9991", + "reference": "ea9896d8f088f1902be19397bc18b358e3de9991", "shasum": "" }, "require": { @@ -8107,23 +8109,23 @@ "description": "os2forms_nemlogin_openid_connect", "homepage": "https://www.drupal.org/project/os2forms_nemlogin_openid_connect", "support": { - "source": "https://github.com/itk-dev/os2forms_nemlogin_openid_connect/tree/develop", + "source": "https://github.com/itk-dev/os2forms_nemlogin_openid_connect/tree/1.0.0", "issues": "https://github.com/itk-dev/os2forms_nemlogin_openid_connect/issues" }, - "time": "2022-01-11T10:53:44+00:00" + "time": "2022-06-29T18:39:02+00:00" }, { "name": "itk-dev/os2forms_user_field_lookup", - "version": "dev-develop", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/itk-dev/os2forms_user_field_lookup.git", - "reference": "685e5b06d68c22f3aa772eaeb15b4d501689f555" + "reference": "2ccbcea20a0a762796d0ce16d9631a8558e344a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itk-dev/os2forms_user_field_lookup/zipball/685e5b06d68c22f3aa772eaeb15b4d501689f555", - "reference": "685e5b06d68c22f3aa772eaeb15b4d501689f555", + "url": "https://api.github.com/repos/itk-dev/os2forms_user_field_lookup/zipball/2ccbcea20a0a762796d0ce16d9631a8558e344a6", + "reference": "2ccbcea20a0a762796d0ce16d9631a8558e344a6", "shasum": "" }, "require-dev": { @@ -8144,9 +8146,9 @@ "description": "Use user field data in webforms.", "support": { "issues": "https://github.com/itk-dev/os2forms_user_field_lookup/issues", - "source": "https://github.com/itk-dev/os2forms_user_field_lookup/tree/develop" + "source": "https://github.com/itk-dev/os2forms_user_field_lookup/tree/1.0.0" }, - "time": "2021-11-05T08:53:51+00:00" + "time": "2022-06-29T18:36:01+00:00" }, { "name": "itk-dev/serviceplatformen", @@ -8198,7 +8200,7 @@ }, { "name": "itk-dev/web_accessibility_statement", - "version": "dev-master", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/itk-dev/web_accessibility_statement.git", @@ -8210,7 +8212,6 @@ "reference": "b27f2ea237f0712896f7440727c17c47a543e3ea", "shasum": "" }, - "default-branch": true, "type": "drupal-module", "notification-url": "https://packagist.org/downloads/", "description": "Provides path for accessibility statement", @@ -8834,16 +8835,16 @@ }, { "name": "os2forms/os2forms", - "version": "3.2.3", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/OS2Forms/os2forms.git", - "reference": "f76037a0a58e2992234d9bc52777b17b5c5bb0b7" + "reference": "96cc03245ce35ee885cc54f530aec494a7fce62c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OS2Forms/os2forms/zipball/f76037a0a58e2992234d9bc52777b17b5c5bb0b7", - "reference": "f76037a0a58e2992234d9bc52777b17b5c5bb0b7", + "url": "https://api.github.com/repos/OS2Forms/os2forms/zipball/96cc03245ce35ee885cc54f530aec494a7fce62c", + "reference": "96cc03245ce35ee885cc54f530aec494a7fce62c", "shasum": "" }, "require": { @@ -8867,6 +8868,10 @@ "tecnickcom/tcpdf": "~6", "vaimo/composer-patches": "^4.20" }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "drupal/coder": "^8.3" + }, "type": "drupal-module", "extra": { "composer-exit-on-patch-failure": true, @@ -8890,22 +8895,22 @@ "description": "Drupal 8 OS2Form module provides advanced webform functionality for Danish Municipalities", "support": { "issues": "https://github.com/OS2Forms/os2forms/issues", - "source": "https://github.com/OS2Forms/os2forms/tree/3.2.3" + "source": "https://github.com/OS2Forms/os2forms/tree/3.2.7" }, - "time": "2022-02-03T13:37:29+00:00" + "time": "2022-06-29T10:37:55+00:00" }, { "name": "os2forms/os2forms_forloeb", - "version": "2.3.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/OS2Forms/os2forms_forloeb.git", - "reference": "59c6bc586f01477dd574d5c23b271e96f398b601" + "reference": "05fedb45429b06b8218bd9477b7496e86e22a434" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OS2Forms/os2forms_forloeb/zipball/59c6bc586f01477dd574d5c23b271e96f398b601", - "reference": "59c6bc586f01477dd574d5c23b271e96f398b601", + "url": "https://api.github.com/repos/OS2Forms/os2forms_forloeb/zipball/05fedb45429b06b8218bd9477b7496e86e22a434", + "reference": "05fedb45429b06b8218bd9477b7496e86e22a434", "shasum": "" }, "require": { @@ -8947,6 +8952,10 @@ "webmozart/path-util": "^2.3", "zaporylie/composer-drupal-optimizations": "^1.2" }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "drupal/coder": "^8.3" + }, "type": "drupal-module", "extra": { "composer-exit-on-patch-failure": true, @@ -8982,22 +8991,22 @@ "description": "This module adds Maestro workflow engine and functionality to produce advanced workflows", "support": { "issues": "https://github.com/OS2Forms/os2forms_forloeb/issues", - "source": "https://github.com/OS2Forms/os2forms_forloeb/tree/2.3.1" + "source": "https://github.com/OS2Forms/os2forms_forloeb/tree/2.4.0" }, - "time": "2022-02-08T16:01:38+00:00" + "time": "2022-06-27T09:00:22+00:00" }, { "name": "os2forms/os2forms_forloeb_profile", - "version": "1.8.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/OS2Forms/os2forms_forloeb_profile.git", - "reference": "6d84f6f4769d52ce9aa6a5a3b452906c9c76436b" + "reference": "32e80e3491b6d04eb3be7957c8e0a1fd06b44df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OS2Forms/os2forms_forloeb_profile/zipball/6d84f6f4769d52ce9aa6a5a3b452906c9c76436b", - "reference": "6d84f6f4769d52ce9aa6a5a3b452906c9c76436b", + "url": "https://api.github.com/repos/OS2Forms/os2forms_forloeb_profile/zipball/32e80e3491b6d04eb3be7957c8e0a1fd06b44df9", + "reference": "32e80e3491b6d04eb3be7957c8e0a1fd06b44df9", "shasum": "" }, "require": { @@ -9007,6 +9016,10 @@ "os2forms/os2forms_forloeb": "^2.0.0-rc", "os2web/os2web_simplesaml": "8.x-dev" }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "drupal/coder": "^8.3" + }, "type": "drupal-profile", "extra": { "composer-exit-on-patch-failure": true, @@ -9030,9 +9043,9 @@ "description": "This profile adds the configuration and initial install of OS2forms 2.1 med Forløb.", "support": { "issues": "https://github.com/OS2Forms/os2forms_forloeb_profile/issues", - "source": "https://github.com/OS2Forms/os2forms_forloeb_profile/tree/1.8.0" + "source": "https://github.com/OS2Forms/os2forms_forloeb_profile/tree/1.9.0" }, - "time": "2022-01-25T12:52:20+00:00" + "time": "2022-06-29T12:33:38+00:00" }, { "name": "os2web/os2web_datalookup", @@ -21018,27 +21031,14 @@ "time": "2021-07-28T10:34:58+00:00" } ], - "aliases": [ - { - "package": "drupal/maestro", - "version": "dev-3.x", - "alias": "3.0.1-rc2", - "alias_normalized": "3.0.1.0-RC2" - } - ], + "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "drupal/maestro": 20, - "itk-dev/os2forms_digital_post": 20, - "itk-dev/os2forms_nemlogin_openid_connect": 20, - "itk-dev/os2forms_user_field_lookup": 20, - "itk-dev/web_accessibility_statement": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "~7.4.0 || ~8.0.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/config/sync/core.date_format.short.yml b/config/sync/core.date_format.short.yml index 5bfc0ad4..caf83d9c 100644 --- a/config/sync/core.date_format.short.yml +++ b/config/sync/core.date_format.short.yml @@ -7,4 +7,4 @@ _core: id: short label: 'Standard kort dato' locked: false -pattern: 'm/d/Y - H:i' +pattern: 'd. F Y' diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 00000000..16a21240 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,30 @@ +# itk-version: 2.1.0 +version: "3" + +services: + phpfpm: + environment: + - PHP_MAILHOG_ENABLE=true + - PHP_MAILHOG_SERVER=mailhog + - PHP_MAILHOG_PORT=1025 + + nginx: + labels: + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file" + + mailhog: + image: mailhog/mailhog + networks: + - app + - frontend + labels: + - "traefik.enable=true" + - "traefik.docker.network=frontend" + - "traefik.http.routers.mailhog_${COMPOSE_PROJECT_NAME}-http.rule=Host(`mailhog.${COMPOSE_SERVER_DOMAIN}`)" + - "traefik.http.routers.mailhog_${COMPOSE_PROJECT_NAME}-http.entrypoints=web" + - "traefik.http.routers.mailhog_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https" + - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + - "traefik.http.routers.mailhog_${COMPOSE_PROJECT_NAME}.rule=Host(`mailhog.${COMPOSE_SERVER_DOMAIN}`)" + - "traefik.http.routers.mailhog_${COMPOSE_PROJECT_NAME}.entrypoints=websecure" + - "traefik.http.services.mailhog_${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8025" + - "traefik.http.routers.mailhog_${COMPOSE_PROJECT_NAME}.middlewares=ITKMailhogAuth@file" diff --git a/docker-compose.redirect.yml b/docker-compose.redirect.yml new file mode 100644 index 00000000..ee6568c3 --- /dev/null +++ b/docker-compose.redirect.yml @@ -0,0 +1,17 @@ +# itk-version: 2.1.0 +version: "3" + +services: + nginx: + labels: + # Add www before domain and set redirect to non-www + - "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.rule=Host(`www.${COMPOSE_SERVER_DOMAIN}`)" + - "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.entrypoints=web" + - "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https,non_www" + - "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.rule=Host(`www.${COMPOSE_SERVER_DOMAIN}`)" + - "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.entrypoints=websecure" + - "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.middlewares=non_www" + + - traefik.http.middlewares.non_www.redirectregex.regex=^(http|https)?://(?:www\.)?(.+) + - traefik.http.middlewares.non_www.redirectregex.replacement=https://$${2} + - traefik.http.middlewares.non_www.redirectregex.permanent=true diff --git a/docker-compose.server.yml b/docker-compose.server.yml index 3da25f9b..14c31b86 100644 --- a/docker-compose.server.yml +++ b/docker-compose.server.yml @@ -1,4 +1,4 @@ -# itk-version: 1.0.0 +# itk-version: 2.1.0 version: "3" networks: @@ -14,15 +14,16 @@ services: restart: unless-stopped networks: - app + extra_hosts: + - "host.docker.internal:host-gateway" environment: - PHP_MAX_EXECUTION_TIME=30 - PHP_MEMORY_LIMIT=128M - - COMPOSER_VERSION=1 + - COMPOSER_VERSION=2 depends_on: - memcached volumes: - .:/app:delegated - - drush-cache:/root/.drush nginx: image: nginx:stable-alpine @@ -45,8 +46,7 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https" - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" - #- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure" memcached: image: 'memcached:latest' @@ -55,17 +55,3 @@ services: - app environment: - MEMCACHED_CACHE_SIZE=64 - - drush: - image: itkdev/drush6:latest - networks: - - app - entrypoint: - - drush - volumes: - - drush-cache:/root/.drush - - ./:/app - -# Drush cache volume to persist cache between runs. -volumes: - drush-cache: diff --git a/docker-compose.yml b/docker-compose.yml index 72dff323..3ba4b463 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -# itk-version: 1.0.1 +# itk-version: 2.0.1 version: "3" networks: @@ -21,7 +21,7 @@ services: - MYSQL_PASSWORD=db - MYSQL_DATABASE=db #- ENCRYPT=1 # Uncomment to enable database encryption. - # @see https://symfony.com/doc/current/setup/symfony_server.html#docker-integration + # https://symfony.com/doc/current/setup/symfony_server.html#docker-integration labels: com.symfony.server.service-prefix: 'DATABASE' @@ -32,6 +32,7 @@ services: environment: - XDEBUG_MODE=${XDEBUG_MODE:-off} - XDEBUG_SESSION=${XDEBUG_SESSION:-0} + - PHP_IDE_CONFIG=serverName=localhost - PHP_MAX_EXECUTION_TIME=30 - PHP_MEMORY_LIMIT=256M # - PHP_MAIL=1 # Uncomment to enable mailhog. @@ -41,7 +42,7 @@ services: - mariadb - memcached volumes: - - .:/app:delegated + - nfsApp:/app:delegated nginx: image: nginx:latest @@ -54,11 +55,14 @@ services: - '80' volumes: - ${PWD}/.docker/vhost.conf:/etc/nginx/conf.d/default.conf:ro - - ./:/app:delegated + - nfsApp:/app:delegated labels: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" +# HTTPS config - uncomment to enable redirect from :80 to :443 +# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" +# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" memcached: image: 'memcached:latest' @@ -82,3 +86,15 @@ services: - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}Mailhog.rule=Host(`mailhog-${COMPOSE_DOMAIN}`)" - "traefik.http.services.${COMPOSE_PROJECT_NAME}Mailhog.loadbalancer.server.port=8025" + +volumes: + # Named volume requires that you have NFS shares enabled (performance boost on Macs). + # Use `itkdev-docker-compose nfs:enable` to enable NFS shares. If you don't want to use it remove it from here and + # change the volume mapping to use normal shares in the containers. See + # https://sean-handley.medium.com/how-to-set-up-docker-for-mac-with-native-nfs-145151458adc + nfsApp: + driver: local + driver_opts: + type: nfs + o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3 + device: ":$PWD" diff --git a/web/modules/custom/os2forms_api_request_handler/src/Plugin/WebformHandler/WebformHandler.php b/web/modules/custom/os2forms_api_request_handler/src/Plugin/WebformHandler/WebformHandler.php index c9019d05..0f231ae3 100644 --- a/web/modules/custom/os2forms_api_request_handler/src/Plugin/WebformHandler/WebformHandler.php +++ b/web/modules/custom/os2forms_api_request_handler/src/Plugin/WebformHandler/WebformHandler.php @@ -82,7 +82,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta } $form['api_url'] = [ - '#type' => 'textfield', + '#type' => 'textarea', '#title' => $this->t('API url'), '#description' => $this->t('The API url. For testing, an api url can be obtained from Webhook.site.'), '#required' => TRUE, @@ -90,7 +90,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta ]; $form['api_authorization_header'] = [ - '#type' => 'textfield', + '#type' => 'textarea', '#title' => $this->t('API authorization header'), '#description' => $this->t('The API authorization header value. Will be sent in an authorization header: Authorization: «value».'), '#required' => TRUE,