Fix broken update stats button and add sidekiq to docker-compose.yml

This commit is contained in:
Eugene Burmakin 2024-03-24 20:09:10 +01:00
parent 64e5028514
commit 705c7ca7a2
5 changed files with 23 additions and 4 deletions

View file

@ -4,7 +4,6 @@ import "@rails/actioncable"
import "controllers"
import "@hotwired/turbo-rails"
import "mapkick/bundle"
import "leaflet"
import "leaflet-providers"
import "chartkick"

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html data-theme="dark">
<head>
<title>Dawarich</title>
<title>Da War Ich</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

View file

@ -38,7 +38,7 @@
<% end %>
</div>
<%= 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 } %>

View file

@ -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"

View file

@ -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: