diff --git a/.app_version b/.app_version index 69bf493e..697f087f 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.27.5 +0.28.0 diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 94ae2ead..f5752cc9 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -10,7 +10,6 @@ services: - dawarich_public:/var/app/public - dawarich_watched:/var/app/tmp/imports/watched - dawarich_storage:/var/app/storage - - dawarich_sqlite_data:/dawarich_sqlite_data networks: - dawarich ports: @@ -71,4 +70,3 @@ volumes: dawarich_public: dawarich_watched: dawarich_storage: - dawarich_sqlite_data: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4ba4fe..1f70c08b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,130 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -# 0.27.5 - 2025-06-08 +# 0.28.0 - 2025-06-09 + +⚠️ This release includes a breaking change. ⚠️ + +_yet another, yay!_ + +Well, we're moving back to Sidekiq and Redis for background jobs and caching. Unfortunately, SolidQueue and SolidCache brought more problems than they solved. Please update your `docker-compose.yml` to use Redis and Sidekiq. + +```diff +networks: + dawarich: +services: ++ dawarich_redis: ++ image: redis:7.4-alpine ++ container_name: dawarich_redis ++ command: redis-server ++ networks: ++ - dawarich ++ volumes: ++ - dawarich_shared:/data ++ restart: always ++ healthcheck: ++ test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] ++ interval: 10s ++ retries: 5 ++ start_period: 30s ++ timeout: 10s +... + dawarich_app: + image: freikin/dawarich:latest + container_name: dawarich_app + volumes: + - dawarich_public:/var/app/public + - dawarich_watched:/var/app/tmp/imports/watched + - dawarich_storage:/var/app/storage + - dawarich_db_data:/dawarich_db_data +- - dawarich_sqlite_data:/dawarich_sqlite_data + ... + restart: on-failure + environment: + RAILS_ENV: development ++ REDIS_URL: redis://dawarich_redis:6379 + DATABASE_HOST: dawarich_db + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: password + DATABASE_NAME: dawarich_development +- # PostgreSQL database name for solid_queue +- QUEUE_DATABASE_NAME: dawarich_development_queue +- QUEUE_DATABASE_PASSWORD: password +- QUEUE_DATABASE_USERNAME: postgres +- QUEUE_DATABASE_HOST: dawarich_db +- QUEUE_DATABASE_PORT: 5432 +- # SQLite database paths for cache and cable databases +- CACHE_DATABASE_PATH: /dawarich_sqlite_data/dawarich_development_cache.sqlite3 +- CABLE_DATABASE_PATH: /dawarich_sqlite_data/dawarich_development_cable.sqlite3 +... + depends_on: + dawarich_db: + condition: service_healthy + restart: true ++ dawarich_redis: ++ condition: service_healthy ++ restart: true +... ++ dawarich_sidekiq: ++ image: freikin/dawarich:latest ++ container_name: dawarich_sidekiq ++ volumes: ++ - dawarich_public:/var/app/public ++ - dawarich_watched:/var/app/tmp/imports/watched ++ - dawarich_storage:/var/app/storage ++ networks: ++ - dawarich ++ stdin_open: true ++ tty: true ++ entrypoint: sidekiq-entrypoint.sh ++ command: ['sidekiq'] ++ restart: on-failure ++ environment: ++ RAILS_ENV: development ++ REDIS_URL: redis://dawarich_redis:6379 ++ DATABASE_HOST: dawarich_db ++ DATABASE_USERNAME: postgres ++ DATABASE_PASSWORD: password ++ DATABASE_NAME: dawarich_development ++ APPLICATION_HOSTS: localhost ++ BACKGROUND_PROCESSING_CONCURRENCY: 10 ++ APPLICATION_PROTOCOL: http ++ PROMETHEUS_EXPORTER_ENABLED: false ++ PROMETHEUS_EXPORTER_HOST: dawarich_app ++ PROMETHEUS_EXPORTER_PORT: 9394 ++ SELF_HOSTED: "true" ++ STORE_GEODATA: "true" ++ logging: ++ driver: "json-file" ++ options: ++ max-size: "100m" ++ max-file: "5" ++ healthcheck: ++ test: [ "CMD-SHELL", "pgrep -f sidekiq" ] ++ interval: 10s ++ retries: 30 ++ start_period: 30s ++ timeout: 10s ++ depends_on: ++ dawarich_db: ++ condition: service_healthy ++ restart: true ++ dawarich_redis: ++ condition: service_healthy ++ restart: true ++ dawarich_app: ++ condition: service_healthy ++ restart: true +... +volumes: + dawarich_db_data: +- dawarich_sqlite_data: + dawarich_shared: + dawarich_public: + dawarich_watched: + dawarich_storage: + +``` ## Fixed @@ -15,6 +138,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Changed - Geocoder is now being installed from a private fork for debugging purposes. +- Redis is now being used for caching. +- Sidekiq is now being used for background jobs. + +## Removed +- SolidQueue, SolidCache and SolidCable are now removed. # 0.27.4 - 2025-06-06 diff --git a/config/environments/development.rb b/config/environments/development.rb index c177d97e..9d8c02c9 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -26,7 +26,7 @@ Rails.application.configure do # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - config.cache_store = :redis_cache_store, { url: ENV['REDIS_URL'] } + config.cache_store = :redis_cache_store, { url: "#{ENV['REDIS_URL']}/0" } if Rails.root.join('tmp/caching-dev.txt').exist? config.action_controller.perform_caching = true diff --git a/config/environments/production.rb b/config/environments/production.rb index 26913253..4d6d0330 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -73,7 +73,7 @@ Rails.application.configure do config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') # Use a different cache store in production. - config.cache_store = :redis_cache_store, { url: ENV['REDIS_URL'] } + config.cache_store = :redis_cache_store, { url: "#{ENV['REDIS_URL']}/0" } # Use a real queuing backend for Active Job (and separate queues per environment). config.active_job.queue_adapter = :sidekiq diff --git a/config/initializers/geocoder.rb b/config/initializers/geocoder.rb index 1c5e135c..4ddfe9d4 100644 --- a/config/initializers/geocoder.rb +++ b/config/initializers/geocoder.rb @@ -4,7 +4,7 @@ settings = { debug_mode: true, timeout: 5, units: :km, - cache: Redis.new(url: ENV['REDIS_URL']), + cache: Redis.new(url: "#{ENV['REDIS_URL']}/0"), always_raise: :all, http_headers: { 'User-Agent' => "Dawarich #{APP_VERSION} (https://dawarich.app)" diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 66154781..49b0c98b 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -24,7 +24,7 @@ Sidekiq.configure_server do |config| end Sidekiq.configure_client do |config| - config.redis = { url: ENV['REDIS_URL'] } + config.redis = { url: "#{ENV['REDIS_URL']}/1" } end Sidekiq::Queue['reverse_geocoding'].limit = 1 if Sidekiq.server? && DawarichSettings.photon_uses_komoot_io? diff --git a/docker/docker-compose.production.yml b/docker/docker-compose.production.yml index 52b2c72c..5705da9b 100644 --- a/docker/docker-compose.production.yml +++ b/docker/docker-compose.production.yml @@ -43,7 +43,6 @@ services: - dawarich_watched:/var/app/tmp/imports/watched - dawarich_storage:/var/app/storage - dawarich_db_data:/dawarich_db_data - - dawarich_sqlite_data:/dawarich_sqlite_data networks: - dawarich ports: @@ -153,4 +152,3 @@ volumes: dawarich_public: dawarich_watched: dawarich_storage: - dawarich_sqlite_data: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 34df9468..89611157 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -46,7 +46,6 @@ services: - dawarich_watched:/var/app/tmp/imports/watched - dawarich_storage:/var/app/storage - dawarich_db_data:/dawarich_db_data - - dawarich_sqlite_data:/dawarich_sqlite_data networks: - dawarich ports: @@ -146,9 +145,9 @@ services: dawarich_app: condition: service_healthy restart: true + volumes: dawarich_db_data: - dawarich_sqlite_data: dawarich_shared: dawarich_public: dawarich_watched: