Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic update #930

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DRUPAL_HOSTNAME=helfi-sote.docker.so
STAGE_FILE_PROXY_ORIGIN=https://stplattaprod.blob.core.windows.net
STAGE_FILE_PROXY_ORIGIN_DIR=terveysprod

COMPOSE_PROFILES=queue,search
COMPOSE_PROFILES=queue

# Docker image
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.3
Expand Down
5 changes: 2 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,12 @@ services:
- search
artemis:
container_name: "${COMPOSE_PROJECT_NAME}-artemis"
image: quay.io/artemiscloud/activemq-artemis-broker
environment:
AMQ_EXTRA_ARGS: "--user admin --password admin"
image: apache/activemq-artemis
depends_on:
- app
networks:
- internal
- stonehenge-network
profiles:
- queue
chromium:
Expand Down
154 changes: 77 additions & 77 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ content:
third_party_settings: { }
simple_sitemap:
weight: 10
region: content
settings: { }
third_party_settings: { }
region: content
status:
type: boolean_checkbox
weight: 12
Expand Down
20 changes: 10 additions & 10 deletions conf/cmi/core.entity_form_display.tpr_unit.tpr_unit.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ content:
collapse_edit_all: collapse_edit_all
duplicate: duplicate
third_party_settings: { }
field_districts:
type: select2_entity_reference
weight: 29
region: content
settings:
width: 100%
autocomplete: false
match_operator: STARTS_WITH
match_limit: 10
third_party_settings: { }
field_lower_content:
type: paragraphs
weight: 33
Expand Down Expand Up @@ -434,16 +444,6 @@ content:
formatter_settings: { }
show_description: false
third_party_settings: { }
field_districts:
type: select2_entity_reference
weight: 29
region: content
settings:
width: 100%
autocomplete: false
match_operator: STARTS_WITH
match_limit: 10
third_party_settings: { }
hidden:
created: true
hide_description: true
Expand Down
3 changes: 1 addition & 2 deletions conf/cmi/search_api.index.health_stations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ dependencies:
config:
- search_api.server.elastic_sote
module:
- helfi_tpr
- search_api
- helfi_react_search
- helfi_tpr
id: health_stations
name: 'Health stations'
description: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ dependencies:
config:
- search_api.server.elastic_sote
module:
- helfi_tpr
- search_api
- helfi_react_search
- helfi_tpr
id: maternity_and_child_health_clinic
name: 'maternity and child health clinic'
description: ''
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.er_tpr_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ display:
type: mini
options:
offset: 0
pagination_heading_level: h4
items_per_page: 10
total_pages: null
id: 0
Expand All @@ -105,7 +106,6 @@ display:
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.locked_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 50
total_pages: null
id: 0
Expand All @@ -398,7 +399,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.locked_units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 50
total_pages: null
id: 0
Expand All @@ -398,7 +399,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
4 changes: 2 additions & 2 deletions conf/cmi/views.view.service_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 4
total_pages: null
id: 0
Expand All @@ -126,7 +127,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down Expand Up @@ -646,6 +646,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 5
total_pages: null
id: 0
Expand All @@ -663,7 +664,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.service_units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 8
total_pages: null
id: 0
Expand All @@ -110,7 +111,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
17 changes: 17 additions & 0 deletions docker/openshift/crons/menu-queue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

source /init.sh

if [ -z "$AMQ_BROKERS" ]; then
exit 0
fi

if ! is_drupal_module_enabled "helfi_navigation"; then
exit 0
fi

while true
do
# Restart process every 12 hours.
drush stomp:worker helfi_navigation_menu_queue --lease-time 43200
done
11 changes: 11 additions & 0 deletions docker/openshift/crons/revision-queue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

if [ -z "$AMQ_BROKERS" ]; then
exit 0
fi

while true
do
# Restart process every 12 hours.
drush stomp:worker helfi_api_base_revision --lease-time 43200
done
34 changes: 19 additions & 15 deletions public/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,18 @@ function drupal_get_env(string|array $variables) : mixed {
$config['helfi_proxy.settings']['session_suffix'] = $session_suffix;
}

if ($robots_header_enabled = getenv('DRUPAL_X_ROBOTS_TAG_HEADER')) {
$config['helfi_proxy.settings']['robots_header_enabled'] = (bool) $robots_header_enabled;
}

$artemis_destination = drupal_get_env([
'ARTEMIS_DESTINATION',
$amq_destination = drupal_get_env([
'PROJECT_NAME',
]);
$amq_brokers = getenv('AMQ_BROKERS');

$artemis_brokers = getenv('ARTEMIS_BROKERS');

if ($artemis_brokers && $artemis_destination) {
if ($amq_brokers && $amq_destination) {
$settings['stomp']['default'] = [
'clientId' => getenv('ARTEMIS_CLIENT_ID') ?: 'artemis',
'login' => getenv('ARTEMIS_LOGIN') ?: NULL,
'passcode' => getenv('ARTEMIS_PASSCODE') ?: NULL,
'destination' => sprintf('/queue/%s', $artemis_destination),
'brokers' => $artemis_brokers,
'clientId' => getenv('AMQ_CLIENT_ID') ?: 'client_ ' . $amq_destination,
'login' => getenv('AMQ_USER') ?: NULL,
'passcode' => getenv('AMQ_PASSWORD') ?: NULL,
'destination' => sprintf('/queue/%s', $amq_destination),
'brokers' => $amq_brokers,
'timeout' => ['read' => 12000],
'heartbeat' => [
'send' => 20000,
Expand All @@ -289,7 +283,17 @@ function drupal_get_env(string|array $variables) : mixed {
],
],
];
$settings['queue_default'] = 'queue.stomp.default';

$queues = [
'helfi_navigation_menu_queue',
'helfi_api_base_revision',
];
foreach ($queues as $queue) {
$settings['queue_service_' . $queue] = 'queue.stomp.default';
}
// You must configure project specific queues manually in 'all.settings.php'
// file.
// @see https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/queue.md
}

$config['filelog.settings']['rotation']['schedule'] = 'never';
Expand Down