diff --git a/images/web/config/settings.local.yml b/images/web/config/settings.local.yml index 8edc67ae..e06c3871 100644 --- a/images/web/config/settings.local.yml +++ b/images/web/config/settings.local.yml @@ -1,39 +1,29 @@ -# The server protocol and host -server_protocol: "http" -server_url: "openhistoricalmap.example.com" -# Publisher -#publisher_url: "" -# The generator +server_url: "0.0.0.0:3000" +embed_server_url: "https://embed.openhistoricalmap.org/" generator: "OpenHistoricalMap server" copyright_owner: "OpenHistoricalMap and contributors" attribution_url: "http://www.openhistoricalmap.org/copyright" -license_url: "http://opendatacommons.org/licenses/odbl/1-0/" -# Support email address support_email: "ohm-admins@googlegroups.com" -# Sender addresses for emails email_from: "OpenHistoricalMap " email_return_path: "ohm-admins@googlegroups.com" -# OAuth application for the web site -oauth_application: "OAUTH_CLIENT_ID" -oauth_key: "OAUTH_KEY" +status: "api_readonly" +max_number_of_nodes: 100000 +api_timeout: 600 +web_timeout: 600 +#memcache_servers: [] +nominatim_url: "https://nominatim.openhistoricalmap.org/" +# OAuth application for the website +oauth_application: "" +oauth_key: "" # OAuth consumer key for iD id_application: "" -# List of memcache servers to use for caching -memcache_servers: [] -# URL of Nominatim instance to use for geocoding -nominatim_url: "https://nominatim.openhistoricalmap.org/" -# URL of Overpass instance to use for feature queries -overpass_url: "https://overpass-api.de/api/interpreter" -# SMTP settings for outbound mail -smtp_address: "localhost" -smtp_port: 25 -smtp_domain: "localhost" -smtp_enable_starttls_auto: true -smtp_tls_verify_mode: "none" -smtp_authentication: null -smtp_user_name: null -smtp_password: null -doorkeeper_signing_key: | - -----BEGIN PRIVATE KEY----- - PRIVATE_KEY - -----END PRIVATE KEY----- +imagery_blacklist: + # Current Google imagery URLs have google or googleapis in the domain + - ".*\\.google(apis)?\\..*/.*" + # Blacklist VWorld + - "http://xdworld\\.vworld\\.kr:8080/.*" + # Blacklist here + - ".*\\.here\\.com[/:].*" +overpass_url: "https://overpass-api.openhistoricalmap.org/api/interpreter" +# Mastodon url for verification +mastodon_url: "https://mapstodon.space/@ohm" diff --git a/images/web/config/settings.yml b/images/web/config/settings.yml index 518a8115..db871775 100644 --- a/images/web/config/settings.yml +++ b/images/web/config/settings.yml @@ -1,18 +1,18 @@ # The server protocol and host server_protocol: "http" -server_url: "openhistoricalmap.example.com" +server_url: "openstreetmap.example.com" # Publisher #publisher_url: "" # The generator -generator: "OpenHistoricalMap server" -copyright_owner: "OpenHistoricalMap and contributors" -attribution_url: "http://www.openhistoricalmap.org/copyright" +generator: "OpenStreetMap server" +copyright_owner: "OpenStreetMap and contributors" +attribution_url: "http://www.openstreetmap.org/copyright" license_url: "http://opendatacommons.org/licenses/odbl/1-0/" # Support email address -support_email: "ohm-admins@googlegroups.com" +support_email: "openstreetmap@example.com" # Sender addresses for emails -email_from: "OpenHistoricalMap " -email_return_path: "ohm-admins@googlegroups.com" +email_from: "OpenStreetMap " +email_return_path: "openstreetmap@example.com" # API version api_version: "0.6" # Application status - possible values are: @@ -22,19 +22,31 @@ api_version: "0.6" # database_readonly - database and site in read-only mode # database_offline - database offline with site in emergency mode # gpx_offline - gpx storage offline -status: "api_readonly" +status: "online" # The maximum area you're allowed to request, in square degrees max_request_area: 0.25 # Number of GPS trace/trackpoints returned per-page tracepoints_per_page: 5000 +# Default limit on the number of changesets returned by the changeset query api method +default_changeset_query_limit: 100 +# Maximum limit on the number of changesets returned by the changeset query api method +max_changeset_query_limit: 100 # Maximum number of nodes that will be returned by the api in a map request -max_number_of_nodes: 100000 +max_number_of_nodes: 50000 # Maximum number of nodes that can be in a way (checked on save) max_number_of_way_nodes: 2000 # Maximum number of members that can be in a relation (checked on save) max_number_of_relation_members: 32000 # The maximum area you're allowed to request notes from, in square degrees max_note_request_area: 25 +# Default limit on the number of notes returned by the note search api method +default_note_query_limit: 100 +# Maximum limit on the number of notes returned by the note search api method +max_note_query_limit: 10000 +# Maximum value of open issues counter for moderators, anything equal or greater to this value "n" is shown as "n+" +max_issues_count: 99 +# Maximum number of points in a GPX trace +max_trace_size: 1000000 # Zoom level to use for postcode results from the geocoder postcode_zoom: 15 # Timeout for API calls in seconds @@ -43,10 +55,36 @@ api_timeout: 300 web_timeout: 30 # Periods (in hours) which are allowed for user blocks user_block_periods: [0, 1, 3, 6, 12, 24, 48, 96, 168, 336, 731, 4383, 8766, 87660] +# Account deletion cooldown period (in hours) since last changeset close; null to disable, 0 to make sure there aren't any open changesets when the deletion happens +user_account_deletion_delay: null # Rate limit for message sending max_messages_per_hour: 60 +# Default limit on the number of messages returned by inbox and outbox message api +default_message_query_limit: 100 +# Maximum number of messages returned by inbox and outbox message api +max_message_query_limit: 100 # Rate limit for friending max_friends_per_hour: 60 +# Rate limit for changeset comments +min_changeset_comments_per_hour: 1 +initial_changeset_comments_per_hour: 6 +max_changeset_comments_per_hour: 60 +comments_to_max_changeset_comments: 200 +moderator_changeset_comments_per_hour: 36000 +# Rate limit for changes +min_changes_per_hour: 100 +initial_changes_per_hour: 1000 +max_changes_per_hour: 100000 +days_to_max_changes: 7 +importer_changes_per_hour: 1000000 +moderator_changes_per_hour: 1000000 +# Size limit for changes +min_size_limit: 10000000 +initial_size_limit: 30000000 +max_size_limit: 5400000000 +days_to_max_size_limit: 28 +importer_size_limit: 5400000000 +moderator_size_limit: 5400000000 # Domain for handling message replies #messages_domain: "messages.openstreetmap.org" # MaxMind GeoIPv2 database @@ -69,27 +107,16 @@ attachments_dir: ":rails_root/public/attachments" #logstash_path: "" # List of memcache servers to use for caching #memcache_servers: [] -# Enable HTTP basic authentication support -basic_auth_support: true -# Enable legacy OAuth 1.0 support -oauth_10_support: true # URL of Nominatim instance to use for geocoding -nominatim_url: "https://nominatim.openhistoricalmap.org/" +nominatim_url: "https://nominatim.openstreetmap.org/" # Default editor default_editor: "id" # OAuth application for the web site -oauth_application: "OAUTH_CLIENT_ID" -oauth_key: "OAUTH_KEY" -# OAuth consumer key for iD -id_application: "" +#oauth_application: "" +# OAuth application for iD +#id_application: "" # Imagery to return in capabilities as blacklisted -imagery_blacklist: - # Current Google imagery URLs have google or googleapis in the domain - - ".*\\.google(apis)?\\..*/.*" - # Blacklist VWorld - - "http://xdworld\\.vworld\\.kr:8080/.*" - # Blacklist here - - ".*\\.here\\.com[/:].*" +imagery_blacklist: [] # URL of Overpass instance to use for feature queries overpass_url: "https://overpass-api.de/api/interpreter" overpass_credentials: false @@ -103,18 +130,18 @@ fossgis_valhalla_url: "https://valhalla1.openstreetmap.de/route" #google_openid_realm: "" #facebook_auth_id: "" #facebook_auth_secret: "" -#windowslive_auth_id: "" -#windowslive_auth_secret: "" #github_auth_id: "" #github_auth_secret: "" +#microsoft_auth_id: "" +#microsoft_auth_secret: "" #wikipedia_auth_id: "" #wikipedia_auth_secret: "" # Thunderforest authentication details #thunderforest_key: "" +# Tracestrack authentication details +#tracestrack_key: "" # Key for generating TOTP tokens #totp_key: "" -# Mastodon url for verification -mastodon_url: "https://mapstodon.space/@ohm" # Enforce Content-Security-Policy csp_enforce: false # URL for reporting Content-Security-Policy violations @@ -139,14 +166,15 @@ smtp_tls_verify_mode: "none" smtp_authentication: null smtp_user_name: null smtp_password: null -# Rate limit for changeset comments -min_changeset_comments_per_hour: 1 -initial_changeset_comments_per_hour: 6 -max_changeset_comments_per_hour: 60 -moderator_changeset_comments_per_hour: 36000 -embed_server_url: "https://embed.openhistoricalmap.org/" +# Matomo settings for analytics +#matomo: +# Signup rate limits +#signup_ip_per_day: +#signup_ip_max_burst: +#signup_email_per_day: +#signup_email_max_burst: # Private key for signing id_tokens -doorkeeper_signing_key: | - -----BEGIN PRIVATE KEY----- - PRIVATE_KEY - -----END PRIVATE KEY----- +#doorkeeper_signing_key: | +# -----BEGIN PRIVATE KEY----- +# ... +# -----END PRIVATE KEY----- diff --git a/images/web/start.sh b/images/web/start.sh index a47d8731..780b6785 100755 --- a/images/web/start.sh +++ b/images/web/start.sh @@ -14,40 +14,35 @@ production: encoding: utf8" >$workdir/config/database.yml #### Setting up server_url and server_protocol -sed -i -e 's/server_url: "openhistoricalmap.example.com"/server_url: "'$SERVER_URL'"/g' $workdir/config/settings.local.yml -sed -i -e 's/server_protocol: "http"/server_protocol: "'$SERVER_PROTOCOL'"/g' $workdir/config/settings.local.yml +sed -i -e 's/^server_protocol: "http"/server_protocol: "'$SERVER_PROTOCOL'"/g' $workdir/config/settings.yml +sed -i -e 's/^server_url: ".*"/server_url: "'$SERVER_URL'"/g' $workdir/config/settings.local.yml ### Setting up website status sed -i "s/online/$WEBSITE_STATUS/g" $workdir/config/settings.yml #### Setting up mail sender -sed -i -e 's/smtp_address: "localhost"/smtp_address: "'$MAILER_ADDRESS'"/g' $workdir/config/settings.local.yml -sed -i -e 's/smtp_domain: "localhost"/smtp_domain: "'$MAILER_DOMAIN'"/g' $workdir/config/settings.local.yml -sed -i -e 's/smtp_enable_starttls_auto: false/smtp_enable_starttls_auto: true/g' $workdir/config/settings.local.yml -sed -i -e 's/smtp_authentication: null/smtp_authentication: "login"/g' $workdir/config/settings.local.yml -sed -i -e 's/smtp_user_name: null/smtp_user_name: "'$MAILER_USERNAME'"/g' $workdir/config/settings.local.yml -sed -i -e 's/smtp_password: null/smtp_password: "'$MAILER_PASSWORD'"/g' $workdir/config/settings.local.yml -sed -i -e 's/openstreetmap@example.com/'$MAILER_FROM'/g' $workdir/config/settings.local.yml -sed -i -e 's/smtp_port: 25/smtp_port: '$MAILER_PORT'/g' $workdir/config/settings.local.yml - -#### Setting up id key fro the website -sed -i -e 's/id_application: ""/id_application: "'$OPENSTREETMAP_id_key'"/g' $workdir/config/settings.local.yml -sed -i -e 's/#id_application: ""/id_application: "'$OPENSTREETMAP_id_key'"/g' $workdir/config/settings.yml - -#### Setting up oauth id and key for iD editor -sed -i -e 's/OAUTH_CLIENT_ID/'$OAUTH_CLIENT_ID'/g' $workdir/config/settings.local.yml -sed -i -e 's/OAUTH_KEY/'$OAUTH_KEY'/g' $workdir/config/settings.local.yml -sed -i -e 's/# oauth_application: "OAUTH_CLIENT_ID"/oauth_application: "'$OAUTH_CLIENT_ID'"/g' $workdir/config/settings.yml -sed -i -e 's/# oauth_key: "OAUTH_CLIENT_ID"/oauth_key: "'$OAUTH_KEY'"/g' $workdir/config/settings.yml +sed -i -e 's/smtp_address: "localhost"/smtp_address: "'$MAILER_ADDRESS'"/g' $workdir/config/settings.yml +sed -i -e 's/smtp_port: 25/smtp_port: '$MAILER_PORT'/g' $workdir/config/settings.yml +sed -i -e 's/smtp_domain: "localhost"/smtp_domain: "'$MAILER_DOMAIN'"/g' $workdir/config/settings.yml +sed -i -e 's/smtp_authentication: null/smtp_authentication: "login"/g' $workdir/config/settings.yml +sed -i -e 's/smtp_user_name: null/smtp_user_name: "'$MAILER_USERNAME'"/g' $workdir/config/settings.yml +sed -i -e 's/smtp_password: null/smtp_password: "'$MAILER_PASSWORD'"/g' $workdir/config/settings.yml + +### Setting up oauth id and key for iD editor +sed -i -e 's/^oauth_application: ".*"/oauth_application: "'$OAUTH_CLIENT_ID'"/g' $workdir/config/settings.local.yml +sed -i -e 's/^oauth_key: ".*"/oauth_key: "'$OAUTH_KEY'"/g' $workdir/config/settings.local.yml + +#### Setting up id key for the website +sed -i -e 's/^id_application: ".*"/id_application: "'$OPENSTREETMAP_id_key'"/g' $workdir/config/settings.local.yml #### Setup env vars for memcached server -sed -i -e 's/memcache_servers: \[\]/memcache_servers: "'$OPENSTREETMAP_memcache_servers'"/g' $workdir/config/settings.local.yml +sed -i -e 's/#memcache_servers: \[\]/memcache_servers: "'$OPENSTREETMAP_memcache_servers'"/g' $workdir/config/settings.local.yml #### Setting up nominatim url sed -i -e 's/nominatim.openhistoricalmap.org/'$NOMINATIM_URL'/g' $workdir/config/settings.local.yml -#### Setting up overpass url -sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/config/settings.local.yml +## Setting up overpass url +sed -i -e 's/overpass-api.openhistoricalmap.org/'$OVERPASS_URL'/g' $workdir/config/settings.local.yml sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/app/views/site/export.html.erb sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/app/assets/javascripts/index/export.js