diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 73b7cf9f..e0bc7867 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -26,7 +26,6 @@ services: DATABASE_PASSWORD: password DATABASE_NAME: dawarich_development MIN_MINUTES_SPENT_IN_CITY: 60 - APPLICATION_HOST: localhost APPLICATION_HOSTS: localhost TIME_ZONE: Europe/London APPLICATION_PROTOCOL: http diff --git a/CHANGELOG.md b/CHANGELOG.md index 737cf0c7..d1952895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # 0.21.5 - 2025-01-07 -You may now use Geoapify API for reverse geocoding. To obrain an API key, sign up at https://myprojects.geoapify.com/ and create a new project. Make sure you have read and understood the [pricing policy](https://www.geoapify.com/pricing) and [Terms and Conditions](https://www.geoapify.com/terms-and-conditions/). +You may now use Geoapify API for reverse geocoding. To obtain an API key, sign up at https://myprojects.geoapify.com/ and create a new project. Make sure you have read and understood the [pricing policy](https://www.geoapify.com/pricing) and [Terms and Conditions](https://www.geoapify.com/terms-and-conditions/). ### Added @@ -16,6 +16,7 @@ You may now use Geoapify API for reverse geocoding. To obrain an API key, sign u ### Removed - Photon ENV vars from the `.env.development` and docker-compose.yml files. +- `APPLICATION_HOST` env var. # 0.21.4 - 2025-01-05 diff --git a/config/environments/development.rb b/config/environments/development.rb index dd27f7bd..29b9a038 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -86,11 +86,11 @@ Rails.application.configure do # Raise error when a before_action's only/except options reference missing actions config.action_controller.raise_on_missing_callback_actions = true - config.action_mailer.default_url_options = { host: ENV.fetch('APPLICATION_HOST', 'localhost'), port: 3000 } - config.hosts << ENV.fetch('APPLICATION_HOST', 'localhost') - hosts = ENV.fetch('APPLICATION_HOSTS', 'localhost') - config.hosts.concat(hosts.split(',')) if hosts.present? + hosts = ENV.fetch('APPLICATION_HOSTS', 'localhost').split(',') + + config.action_mailer.default_url_options = { host: hosts.first, port: 3000 } + config.hosts.concat(hosts) if hosts.present? config.force_ssl = ENV.fetch('APPLICATION_PROTOCOL', 'http').downcase == 'https' diff --git a/docker-compose.yml b/docker-compose.yml index 688f0ff2..53586a39 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,7 +62,6 @@ services: DATABASE_PASSWORD: password DATABASE_NAME: dawarich_development MIN_MINUTES_SPENT_IN_CITY: 60 - APPLICATION_HOST: localhost APPLICATION_HOSTS: localhost TIME_ZONE: Europe/London APPLICATION_PROTOCOL: http @@ -115,7 +114,6 @@ services: DATABASE_USERNAME: postgres DATABASE_PASSWORD: password DATABASE_NAME: dawarich_development - APPLICATION_HOST: localhost APPLICATION_HOSTS: localhost BACKGROUND_PROCESSING_CONCURRENCY: 10 APPLICATION_PROTOCOL: http diff --git a/docker-compose_mounted_volumes.yml b/docker-compose_mounted_volumes.yml index e355cf59..09fe07d8 100644 --- a/docker-compose_mounted_volumes.yml +++ b/docker-compose_mounted_volumes.yml @@ -41,7 +41,6 @@ services: DATABASE_PASSWORD: password DATABASE_NAME: dawarich_development MIN_MINUTES_SPENT_IN_CITY: 60 - APPLICATION_HOST: localhost APPLICATION_HOSTS: localhost APPLICATION_PROTOCOL: http DISTANCE_UNIT: km @@ -94,7 +93,6 @@ services: DATABASE_USERNAME: postgres DATABASE_PASSWORD: password DATABASE_NAME: dawarich_development - APPLICATION_HOST: localhost APPLICATION_HOSTS: localhost BACKGROUND_PROCESSING_CONCURRENCY: 10 APPLICATION_PROTOCOL: http diff --git a/docs/how_to_setup_reverse_proxy.md b/docs/how_to_setup_reverse_proxy.md index 30cb691b..efaddd2d 100644 --- a/docs/how_to_setup_reverse_proxy.md +++ b/docs/how_to_setup_reverse_proxy.md @@ -14,7 +14,6 @@ dawarich_app: ... environment: ... - APPLICATION_HOST: "yourhost.com" <------------------------------ Edit this APPLICATION_HOSTS: "yourhost.com,www.yourhost.com,127.0.0.1" <-- Edit this ``` @@ -25,7 +24,6 @@ dawarich_sidekiq: ... environment: ... - APPLICATION_HOST: "yourhost.com" <------------------------------ Edit this APPLICATION_HOSTS: "yourhost.com,www.yourhost.com,127.0.0.1" <-- Edit this ... ``` @@ -48,7 +46,7 @@ server { brotli on; brotli_comp_level 6; - brotli_types + brotli_types text/css text/plain text/xml @@ -106,24 +104,24 @@ With the above commands entered, the configuration below should work properly. ```apache ServerName example.com - + ProxyRequests Off ProxyPreserveHost On - + Require all granted - + Header always set X-Real-IP %{REMOTE_ADDR}s Header always set X-Forwarded-For %{REMOTE_ADDR}s Header always set X-Forwarded-Proto https Header always set X-Forwarded-Server %{SERVER_NAME}s Header always set Host %{HTTP_HOST}s - + SetOutputFilter BROTLI AddOutputFilterByType BROTLI_COMPRESS text/css text/plain text/xml text/javascript application/javascript application/json application/manifest+json application/vnd.api+json application/xml application/xhtml+xml application/rss+xml application/atom+xml application/vnd.ms-fontobject application/x-font-ttf application/x-font-opentype application/x-font-truetype image/svg+xml image/x-icon image/vnd.microsoft.icon font/ttf font/eot font/otf font/opentype BrotliCompressionQuality 6 - + ProxyPass / http://127.0.0.1:3000/ ProxyPassReverse / http://127.0.0.1:3000/