mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Added mission control for solid queue ui.
This commit is contained in:
8
Gemfile
8
Gemfile
@@ -74,11 +74,9 @@ gem 'solid_cable'
|
|||||||
gem 'puma'
|
gem 'puma'
|
||||||
gem 'tzinfo-data'
|
gem 'tzinfo-data'
|
||||||
gem 'daemons'
|
gem 'daemons'
|
||||||
# Interface for viewing and managing background jobs
|
# Solid Queue UI
|
||||||
# gem 'delayed_job_web'
|
gem "mission_control-jobs"
|
||||||
# Note: solid_queue-ui is not compatible with Rails 8.0 yet
|
|
||||||
# We'll create a custom UI or wait for compatibility updates
|
|
||||||
# gem 'solid_queue_ui', '~> 0.1.1'
|
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
# gem 'rubocop'
|
# gem 'rubocop'
|
||||||
|
|||||||
11
Gemfile.lock
11
Gemfile.lock
@@ -141,6 +141,16 @@ GEM
|
|||||||
marcel (1.1.0)
|
marcel (1.1.0)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.25.5)
|
minitest (5.25.5)
|
||||||
|
mission_control-jobs (1.1.0)
|
||||||
|
actioncable (>= 7.1)
|
||||||
|
actionpack (>= 7.1)
|
||||||
|
activejob (>= 7.1)
|
||||||
|
activerecord (>= 7.1)
|
||||||
|
importmap-rails (>= 1.2.1)
|
||||||
|
irb (~> 1.13)
|
||||||
|
railties (>= 7.1)
|
||||||
|
stimulus-rails
|
||||||
|
turbo-rails
|
||||||
mocha (2.7.1)
|
mocha (2.7.1)
|
||||||
ruby2_keywords (>= 0.0.5)
|
ruby2_keywords (>= 0.0.5)
|
||||||
msgpack (1.8.0)
|
msgpack (1.8.0)
|
||||||
@@ -340,6 +350,7 @@ DEPENDENCIES
|
|||||||
influxdb-rails
|
influxdb-rails
|
||||||
jbuilder
|
jbuilder
|
||||||
jquery-rails
|
jquery-rails
|
||||||
|
mission_control-jobs
|
||||||
mocha
|
mocha
|
||||||
mysql2
|
mysql2
|
||||||
propshaft
|
propshaft
|
||||||
|
|||||||
@@ -148,6 +148,9 @@ Available system resources: X CPU(s), YMMMB RAM
|
|||||||
SolidQueue plugin enabled in Puma
|
SolidQueue plugin enabled in Puma
|
||||||
```
|
```
|
||||||
|
|
||||||
|
I have deployed Mission Control as a UI for SolidQueue. The uri for mission control is `/jobs`.
|
||||||
|
For the development environment, the user/password is dev/secret. For the production environment, it is defined by environment variables.
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
### Required Environment Variables
|
### Required Environment Variables
|
||||||
@@ -160,6 +163,8 @@ SolidQueue plugin enabled in Puma
|
|||||||
* `WRESTLINGDEV_SECRET_KEY_BASE` - Rails application secret key (can be generated with `rake secret`)
|
* `WRESTLINGDEV_SECRET_KEY_BASE` - Rails application secret key (can be generated with `rake secret`)
|
||||||
* `WRESTLINGDEV_EMAIL` - Email address (currently must be a Gmail account)
|
* `WRESTLINGDEV_EMAIL` - Email address (currently must be a Gmail account)
|
||||||
* `WRESTLINGDEV_EMAIL_PWD` - Email password
|
* `WRESTLINGDEV_EMAIL_PWD` - Email password
|
||||||
|
* `WRESTLINGDEV_MISSION_CONTROL_USER` - mission control username
|
||||||
|
* `WRESTLINGDEV_MISSION_CONTROL_PASSWORD` - mission control password
|
||||||
|
|
||||||
### Optional Environment Variables
|
### Optional Environment Variables
|
||||||
* `SOLID_QUEUE_IN_PUMA` - Set to "true" to run Solid Queue workers inside Puma (default in development)
|
* `SOLID_QUEUE_IN_PUMA` - Set to "true" to run Solid Queue workers inside Puma (default in development)
|
||||||
|
|||||||
@@ -99,4 +99,7 @@ Rails.application.configure do
|
|||||||
|
|
||||||
# Nobuild in development
|
# Nobuild in development
|
||||||
config.assets.build_assets = false
|
config.assets.build_assets = false
|
||||||
|
|
||||||
|
MissionControl::Jobs.http_basic_auth_user = "dev"
|
||||||
|
MissionControl::Jobs.http_basic_auth_password = "secret"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -120,4 +120,7 @@ Rails.application.configure do
|
|||||||
config.assets.compile = true
|
config.assets.compile = true
|
||||||
# Generate digests for assets URLs.
|
# Generate digests for assets URLs.
|
||||||
config.assets.digest = true
|
config.assets.digest = true
|
||||||
|
|
||||||
|
MissionControl::Jobs.http_basic_auth_user = ENV["WRESTLINGDEV_MISSION_CONTROL_USER"]
|
||||||
|
MissionControl::Jobs.http_basic_auth_password =ENV["WRESTLINGDEV_MISSION_CONTROL_PASSWORD"]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Wrestling::Application.routes.draw do
|
Wrestling::Application.routes.draw do
|
||||||
# Mount Action Cable server
|
# Mount Action Cable server
|
||||||
mount ActionCable.server => '/cable'
|
mount ActionCable.server => '/cable'
|
||||||
|
mount MissionControl::Jobs::Engine, at: "/jobs"
|
||||||
|
|
||||||
resources :mats
|
resources :mats
|
||||||
post "mats/:id/assign_next_match" => "mats#assign_next_match", :as => :assign_next_match
|
post "mats/:id/assign_next_match" => "mats#assign_next_match", :as => :assign_next_match
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ services:
|
|||||||
- WRESTLINGDEV_INFLUXDB_HOST=influxdb
|
- WRESTLINGDEV_INFLUXDB_HOST=influxdb
|
||||||
- WRESTLINGDEV_INFLUXDB_PORT=8086
|
- WRESTLINGDEV_INFLUXDB_PORT=8086
|
||||||
- SOLID_QUEUE_IN_PUMA=true
|
- SOLID_QUEUE_IN_PUMA=true
|
||||||
|
- WRESTLINGDEV_MISSION_CONTROL_USER=dev
|
||||||
|
- WRESTLINGDEV_MISSION_CONTROL_PASSWORD=secret
|
||||||
networks:
|
networks:
|
||||||
database:
|
database:
|
||||||
caching:
|
caching:
|
||||||
|
|||||||
@@ -109,6 +109,16 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: wrestlingdev-secrets
|
name: wrestlingdev-secrets
|
||||||
key: influxdb_port
|
key: influxdb_port
|
||||||
|
- name: WRESTLINGDEV_MISSION_CONTROL_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: wrestlingdev-secrets
|
||||||
|
key: mission_control_user
|
||||||
|
- name: WRESTLINGDEV_MISSION_CONTROL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: wrestlingdev-secrets
|
||||||
|
key: mission_control_password
|
||||||
# resources:
|
# resources:
|
||||||
# limits:
|
# limits:
|
||||||
# memory: "768Mi"
|
# memory: "768Mi"
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ stringData:
|
|||||||
replication_password: PUT_REPLICATION_PASSWORD_HERE
|
replication_password: PUT_REPLICATION_PASSWORD_HERE
|
||||||
# Replication host used by the replica to connect to the master
|
# Replication host used by the replica to connect to the master
|
||||||
replication_host: wrestlingdev-mariadb
|
replication_host: wrestlingdev-mariadb
|
||||||
|
# Mission Control Credentials
|
||||||
|
mission_control_user: PUT_MISSION_CONTROL_USERNAME_HERE
|
||||||
|
mission_control_password: PUT_MISSION_CONTROL_PASSWORD_HERE
|
||||||
# OPTIONAL
|
# OPTIONAL
|
||||||
# DELETE THESE LINES IF YOU'RE NOT USING THEM
|
# DELETE THESE LINES IF YOU'RE NOT USING THEM
|
||||||
influxdb_database: PUT INFLUXDB DATABASE NAME HERE
|
influxdb_database: PUT INFLUXDB DATABASE NAME HERE
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ FROM ruby:3.2.0
|
|||||||
ARG USER_ID=1000
|
ARG USER_ID=1000
|
||||||
ARG GROUP_ID=1000
|
ARG GROUP_ID=1000
|
||||||
|
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update --fix-missing \
|
||||||
&& apt-get -qq install -y \
|
&& apt-get -qq install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ ENV TINI_VERSION v0.19.0
|
|||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||||||
RUN chmod +x /tini
|
RUN chmod +x /tini
|
||||||
|
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update --fix-missing \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
openssl \
|
openssl \
|
||||||
|
|||||||
Reference in New Issue
Block a user