Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Jul 15, 2022
2 parents 2d1e242 + 5b21410 commit a738062
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 159 deletions.
34 changes: 5 additions & 29 deletions .docker/vhost.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# @see https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
server {
listen 80;
server_name localhost;
Expand All @@ -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;
}

Expand 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.
Expand All @@ -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 {
Expand All @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -213,3 +214,4 @@ yarn-error.log
config/sync/**/maestro.maestro_template.*
config/sync/**/webform.webform_options.*
config/sync/**/webform.webform.*

29 changes: 2 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,10 @@ local machine for development and testing purposes.
docker-compose exec phpfpm composer install --no-interaction
```

**Note**: Due to <https://github.com/vaimo/composer-patches/issues/85> 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 <https://github.com/vaimo/composer-patches/issues/85> 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:
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
Loading

0 comments on commit a738062

Please sign in to comment.