From 705c7ca7a2f954984cfbbb7b27b314e96a3636f6 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sun, 24 Mar 2024 20:09:10 +0100 Subject: [PATCH] Fix broken update stats button and add sidekiq to docker-compose.yml --- app/javascript/application.js | 1 - app/views/layouts/application.html.erb | 2 +- app/views/stats/index.html.erb | 2 +- config/importmap.rb | 1 - docker-compose.yml | 21 +++++++++++++++++++++ 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/javascript/application.js b/app/javascript/application.js index c35271fe..5eb22b9e 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -4,7 +4,6 @@ import "@rails/actioncable" import "controllers" import "@hotwired/turbo-rails" -import "mapkick/bundle" import "leaflet" import "leaflet-providers" import "chartkick" diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 0c9fe90f..d5b6db57 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - Dawarich + Da War Ich <%= csrf_meta_tags %> <%= csp_meta_tag %> diff --git a/app/views/stats/index.html.erb b/app/views/stats/index.html.erb index ae4b78c3..1446b498 100644 --- a/app/views/stats/index.html.erb +++ b/app/views/stats/index.html.erb @@ -38,7 +38,7 @@ <% end %> - <%= link_to 'Update stats', stats_path, method: :post, class: 'btn btn-primary mt-5' %> + <%= link_to 'Update stats', stats_path, data: { 'turbo-method' => :post }, class: 'btn btn-primary mt-5' %> <% @stats.each do |year, stats| %> <%= render partial: 'stats/year', locals: { year: year, stats: stats } %> diff --git a/config/importmap.rb b/config/importmap.rb index 695152b9..893287ac 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -9,7 +9,6 @@ pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true pin_all_from "app/javascript/controllers", under: "controllers" -pin "mapkick/bundle", to: "mapkick.bundle.js" pin "leaflet" # @1.9.4 pin "leaflet-providers" # @2.0.0 pin "chartkick", to: "chartkick.js" diff --git a/docker-compose.yml b/docker-compose.yml index 67f07529..e92a737f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,6 +44,27 @@ services: depends_on: - dawarich_db - dawarich_redis + dawarich_sidekiq: + image: registry.chibi.rodeo/dawarich:latest + container_name: dawarich_sidekiq + volumes: + - gem_cache:/usr/local/bundle/gems + networks: + - dawarich + stdin_open: true + tty: true + entrypoint: dev-entrypoint.sh + command: ['sidekiq'] + environment: + RAILS_ENV: development + REDIS_URL: redis://dawarich_redis:6379/0 + DATABASE_HOST: dawarich_db + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: password + DATABASE_NAME: dawarich_development + depends_on: + - dawarich_db + - dawarich_redis volumes: db_data: