action :sync
repository "https://github.com/discourse/discourse_docker.git"
# DANGER launch wrapper automatically updates git repo if rebuild method used: https://github.com/discourse/discourse_docker/blob/107ffb40fe8b1ea40e00814468db974a4f3f8e8f/launcher#L799
- revision "136c63890674b95df1327d24270c55e4ef8e87a8"
+ revision "efd6bc8ccbd9057c04d909ff48ecf8b704cae3ff"
user "root"
group "root"
notifies :run, "notify_group[discourse_container_new_data]"
cwd "/srv/community.openstreetmap.org/docker/"
user "root"
group "root"
+ retries 2 # Postgres upgrades required a second run
end
execute "discourse_container_data_destroy" do
#
templates:
- - "templates/postgres.13.template.yml" # NOTE UPDATE THE HOOK REPLACE FOR MAX CONNECTIONS BELOW
+ - "templates/postgres.15.template.yml" # NOTE UPDATE THE HOOK REPLACE FOR MAX CONNECTIONS BELOW
- "templates/redis.template.yml"
# any extra arguments for Docker?
run:
# Make sure this matches the postgresql version template above
- replace:
- filename: "/etc/postgresql/13/main/postgresql.conf"
+ filename: "/etc/postgresql/15/main/postgresql.conf"
from: /#?max_connections *=.*/
to: "max_connections = $db_max_connections"
# any extra arguments for Docker?
# docker_args:
-# Latest Version v3.3.3
+# Latest Version v3.4.0
# Discourse only support tests-passed and stable branches
params:
version: stable
cmd:
- sudo -H -E -u discourse cp /shared/feeds/update-feeds.atom public/update-feeds.atom
after_ssl:
- - replace:
- filename: "/etc/nginx/conf.d/discourse.conf"
- from: /listen 80;/
- to: |
- listen 80;
- listen [::]:80;
- rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent;
-
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /add_header.+/
resolver <%= @resolvers.join(" ") %>;
resolver_timeout 5s;
ssl_dhparam /shared/ssl/dhparam.pem;
+
+run:
+ - replace:
+ filename: "/etc/nginx/conf.d/discourse.conf"
+ from: /return 301.+/
+ to: |
+ rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent;
+ return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
--- /dev/null
+#
+# Cookbook:: imagery
+# Recipe:: au_act_aerial
+#
+# Copyright:: 2025, OpenStreetMap Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include_recipe "imagery"
+
+imagery_site "act-imagery.openstreetmap.org" do
+ title "OpenStreetMap - ACT Imagery"
+ aliases ["act-imagery.osm.org"]
+ # https://leafletjs.com/reference.html#latlngbounds format
+ # [[south, west], [north, east]]
+ bbox [[-35.942, 148.729], [-35.117, 149.430]]
+end
+
+imagery_layer "act_aerial_imagery_202409" do
+ site "act-imagery.openstreetmap.org"
+ title "ACT Aerial Imagery 202409"
+ projection "EPSG:7855"
+ source "https://tiles.arcgis.com/tiles/E5n4f1VY84i0xSjy/arcgis/rest/services/ACT_Aerial_Imagery_202409/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"
+ # attribution per https://www.actmapi.act.gov.au/terms-and-conditions and https://tiles.arcgis.com/tiles/E5n4f1VY84i0xSjy/arcgis/rest/services/ACT_Aerial_Imagery_202409/MapServer/
+ copyright "ACT Imagery from <a href='https://www.actmapi.act.gov.au/home'>ACTmapi</a> (c) Australian Capital Territory and MetroMap. "
+ default_layer true
+ background_colour "0 0 0"
+ extension "jpeg"
+ max_zoom 22
+end
+
+imagery_layer "act_aerial_imagery_202311" do
+ site "act-imagery.openstreetmap.org"
+ title "ACT Aerial Imagery 202311"
+ projection "EPSG:7855"
+ source "https://tiles.arcgis.com/tiles/E5n4f1VY84i0xSjy/arcgis/rest/services/ACT_Aerial_Imagery_202311/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"
+ # attribution per https://www.actmapi.act.gov.au/terms-and-conditions and https://tiles.arcgis.com/tiles/E5n4f1VY84i0xSjy/arcgis/rest/services/ACT_Aerial_Imagery_202311/MapServer/
+ copyright "ACT Imagery from <a href='https://www.actmapi.act.gov.au/home'>ACTmapi</a> (c) Australian Capital Territory and MetroMap. "
+ background_colour "0 0 0"
+ extension "jpeg"
+ max_zoom 22
+end
+
+imagery_layer "act_aerial_imagery_202305" do
+ site "act-imagery.openstreetmap.org"
+ title "ACT Aerial Imagery 202305"
+ projection "EPSG:7855"
+ source "https://tiles.arcgis.com/tiles/E5n4f1VY84i0xSjy/arcgis/rest/services/ACT_Aerial_Imagery_202305/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"
+ # attribution per https://www.actmapi.act.gov.au/terms-and-conditions and https://tiles.arcgis.com/tiles/E5n4f1VY84i0xSjy/arcgis/rest/services/ACT_Aerial_Imagery_202305/MapServer/
+ copyright "ACT Imagery from <a href='https://www.actmapi.act.gov.au/home'>ACTmapi</a> (c) Australian Capital Territory and MetroMap. "
+ background_colour "0 0 0"
+ extension "jpeg"
+ max_zoom 22
+end
--- /dev/null
+#
+# Cookbook:: imagery
+# Recipe:: au_vic_melbourne_aerial
+#
+# Copyright:: 2024, OpenStreetMap Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include_recipe "imagery"
+
+imagery_site "au-vic-melbourne-imagery.openstreetmap.org" do
+ title "OpenStreetMap - City of Melbourne - Aerial Imagery"
+ aliases ["au-vic-melbourne-imagery.osm.org"]
+ # https://leafletjs.com/reference.html#latlngbounds format
+ # [[south, west], [north, east]]
+ bbox [[-37.850667, 144.896981], [-37.775451, 144.991351]]
+end
+
+imagery_layer "melbourne-2020" do
+ site "au-vic-melbourne-imagery.openstreetmap.org"
+ title "City of Melbourne 2020"
+ source "/store/imagery/au/city-of-melbourne/CoM_May2020_2cm.cog.tiff"
+ copyright "(c) 2020 City of Melbourne"
+ max_zoom 23
+ extension "jpeg"
+ revision 2
+ default_layer true
+end
+
+imagery_layer "melbourne-2019" do
+ site "au-vic-melbourne-imagery.openstreetmap.org"
+ title "City of Melbourne 2019"
+ source "/store/imagery/au/city-of-melbourne/CoM_03Feb2019.cog.tiff"
+ copyright "(c) 2019 City of Melbourne"
+ max_zoom 21
+ extension "jpeg"
+ revision 2
+end
+
+imagery_layer "melbourne-2018" do
+ site "au-vic-melbourne-imagery.openstreetmap.org"
+ title "City of Melbourne 2018"
+ source "/store/imagery/au/city-of-melbourne/CoM_May2018_10cm.COG.tiff"
+ copyright "(c) 2018 City of Melbourne"
+ max_zoom 21
+ extension "jpeg"
+ revision 2
+end
description "Map server for #{new_resource.site} layer"
environment "MS_DEBUGLEVEL" => "0",
"MS_ERRORFILE" => "stderr",
- "GDAL_CACHEMAX" => "128"
+ "GDAL_CACHEMAX" => "128",
+ "GDAL_HTTP_TCP_KEEPALIVE" => "YES",
+ "GDAL_HTTP_VERSION" => "2TLS",
+ "GDAL_ENABLE_WMS_CACHE" => "NO"
limit_nofile 16384
memory_high "12G"
memory_max "12G"
group "imagery"
exec_start "/usr/bin/multiwatch -f 8 --signal=TERM -- /usr/lib/cgi-bin/mapserv"
standard_input "socket"
- sandbox true
+ sandbox :enable_network => true
restrict_address_families "AF_UNIX"
timeout_stop_sec 60
not_if { new_resource.uses_tiler }
systemd_timer "mapserv-fcgi-#{new_resource.site}-stop" do
on_boot_sec "10m"
- on_unit_inactive_sec "30m"
+ on_unit_inactive_sec "6h"
randomized_delay_sec "20m"
not_if { new_resource.uses_tiler }
end
location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp)$" {
<% if @uses_tiler -%>
set $args "";
- rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp) /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=$4 break;
+ rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(jpg|jpeg|png|webp) /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x.$4?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first break;
proxy_pass http://<%= @site %>_tiler_backend;
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
}
},
"require": {
- "guzzlehttp/psr7": "2.4.5"
+ "guzzlehttp/psr7": "2.4.5",
+ "data-values/common": "1.0.0",
+ "data-values/data-values": "3.0.0",
+ "data-values/geo": "4.2.3",
+ "data-values/interfaces": "1.0.0",
+ "data-values/number": "0.11.1",
+ "data-values/serialization": "1.2.4",
+ "data-values/time": "1.0.4"
}
}
:list => false,
:transfer_logging => false,
:hosts_allow => [
- "184.104.226.102", # idris
- "2001:470:1:b3b::6" # idris
+ "184.104.226.102", # idris HE
+ "2001:470:1:b3b::6", # idris HE
+ "87.252.214.102", # idris Equinix
+ "2001:4d78:fe03:1c::6" # idris Equinix
]
}
}
run_list(
"recipe[imagery::au_agri]",
+ "recipe[imagery::au_act_aerial]",
+ "recipe[imagery::au_vic_melbourne_aerial]",
"recipe[imagery::gb_ea]",
"recipe[imagery::gb_hampshire_aerial]",
"recipe[imagery::gb_os_sv]",