mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 18:50:12 +01:00
Merge pull request #3124 from TracksApp/fix_env
Upgrade to Rails 7.1 and add some environment fixes
This commit is contained in:
commit
4f6d806724
9 changed files with 26 additions and 30 deletions
17
Gemfile
17
Gemfile
|
|
@ -3,7 +3,7 @@ source 'https://rubygems.org'
|
||||||
gem 'actionpack-xml_parser', '~> 2.0'
|
gem 'actionpack-xml_parser', '~> 2.0'
|
||||||
gem 'activemodel-serializers-xml', '~> 1.0.3'
|
gem 'activemodel-serializers-xml', '~> 1.0.3'
|
||||||
|
|
||||||
gem 'rails', '~> 7.0'
|
gem 'rails', '~> 7.1'
|
||||||
|
|
||||||
gem 'font-awesome-sass', '~> 6.7.2'
|
gem 'font-awesome-sass', '~> 6.7.2'
|
||||||
gem 'jquery-rails', '~> 4.6'
|
gem 'jquery-rails', '~> 4.6'
|
||||||
|
|
@ -31,15 +31,12 @@ gem 'pg', '~> 1.5', group: :postgresql
|
||||||
gem 'mini_racer', group: :therubyracer
|
gem 'mini_racer', group: :therubyracer
|
||||||
|
|
||||||
gem 'sprockets-rails'
|
gem 'sprockets-rails'
|
||||||
|
gem 'coffee-rails', '~> 5.0.0'
|
||||||
group :assets do
|
gem 'dartsass-sprockets'
|
||||||
gem 'coffee-rails', '~> 5.0.0'
|
gem 'bootstrap-sass', '3.4.1'
|
||||||
gem 'dartsass-sprockets'
|
gem 'terser'
|
||||||
gem 'bootstrap-sass', '3.4.1'
|
gem 'listen'
|
||||||
gem 'uglifier', '>=1.3.0'
|
gem 'tolk', '~> 6.0.0'
|
||||||
gem 'listen'
|
|
||||||
gem 'tolk', '~> 6.0.0'
|
|
||||||
end
|
|
||||||
|
|
||||||
group :development, :optional => true do
|
group :development, :optional => true do
|
||||||
gem 'spring', '~> 4'
|
gem 'spring', '~> 4'
|
||||||
|
|
|
||||||
14
Gemfile.lock
14
Gemfile.lock
|
|
@ -192,7 +192,7 @@ GEM
|
||||||
mime-types
|
mime-types
|
||||||
terrapin (~> 0.6.0)
|
terrapin (~> 0.6.0)
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
libv8-node (21.7.2.0)
|
libv8-node (24.1.0.0)
|
||||||
listen (3.9.0)
|
listen (3.9.0)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
|
|
@ -211,8 +211,8 @@ GEM
|
||||||
mime-types-data (3.2023.0218.1)
|
mime-types-data (3.2023.0218.1)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
mini_portile2 (2.8.9)
|
mini_portile2 (2.8.9)
|
||||||
mini_racer (0.12.0)
|
mini_racer (0.19.0)
|
||||||
libv8-node (~> 21.7.2.0)
|
libv8-node (~> 24.1.0.0)
|
||||||
minitest (5.25.5)
|
minitest (5.25.5)
|
||||||
minitest-stub-const (0.6)
|
minitest-stub-const (0.6)
|
||||||
mocha (2.7.1)
|
mocha (2.7.1)
|
||||||
|
|
@ -383,6 +383,8 @@ GEM
|
||||||
unicode-display_width (>= 1.1.1, < 4)
|
unicode-display_width (>= 1.1.1, < 4)
|
||||||
terrapin (0.6.0)
|
terrapin (0.6.0)
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
|
terser (1.2.6)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
thor (1.3.2)
|
thor (1.3.2)
|
||||||
tilt (2.6.0)
|
tilt (2.6.0)
|
||||||
timeout (0.4.3)
|
timeout (0.4.3)
|
||||||
|
|
@ -393,8 +395,6 @@ GEM
|
||||||
rails (>= 3.1)
|
rails (>= 3.1)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
uglifier (4.2.1)
|
|
||||||
execjs (>= 0.3.0, < 3)
|
|
||||||
unicode-display_width (3.1.4)
|
unicode-display_width (3.1.4)
|
||||||
unicode-emoji (~> 4.0, >= 4.0.4)
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
||||||
unicode-emoji (4.0.4)
|
unicode-emoji (4.0.4)
|
||||||
|
|
@ -439,7 +439,7 @@ DEPENDENCIES
|
||||||
pg (~> 1.5)
|
pg (~> 1.5)
|
||||||
puma (~> 6.6)
|
puma (~> 6.6)
|
||||||
rack-mini-profiler
|
rack-mini-profiler
|
||||||
rails (~> 7.0)
|
rails (~> 7.1)
|
||||||
rails-controller-testing
|
rails-controller-testing
|
||||||
rails-dom-testing (~> 2.2.0)
|
rails-dom-testing (~> 2.2.0)
|
||||||
rails_autolink
|
rails_autolink
|
||||||
|
|
@ -453,9 +453,9 @@ DEPENDENCIES
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
sqlite3 (~> 2.7)
|
sqlite3 (~> 2.7)
|
||||||
stripe
|
stripe
|
||||||
|
terser
|
||||||
tolk (~> 6.0.0)
|
tolk (~> 6.0.0)
|
||||||
tracks-chartjs-ror
|
tracks-chartjs-ror
|
||||||
uglifier (>= 1.3.0)
|
|
||||||
will_paginate
|
will_paginate
|
||||||
yard
|
yard
|
||||||
|
|
||||||
|
|
|
||||||
2
bin/rake
2
bin/rake
|
|
@ -9,5 +9,5 @@ if [ -e $SCRIPTPATH/../.use-docker -a ! -e /etc/app-env ];
|
||||||
then
|
then
|
||||||
$SCRIPTPATH/../script/docker-environment $0 "$@"
|
$SCRIPTPATH/../script/docker-environment $0 "$@"
|
||||||
else
|
else
|
||||||
$SCRIPTPATH/run-rake "$@"
|
bundle exec rake "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ SITE_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), 'site.yml'))
|
||||||
module Tracksapp
|
module Tracksapp
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 5.1
|
config.load_defaults 7.0
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
# Application configuration can go into files in config/initializers
|
# Application configuration can go into files in config/initializers
|
||||||
|
|
@ -21,8 +21,7 @@ module Tracksapp
|
||||||
|
|
||||||
# Custom directories with classes and modules you want to be autoloadable.
|
# Custom directories with classes and modules you want to be autoloadable.
|
||||||
# config.autoload_paths += %W(#{config.root}/extras)
|
# config.autoload_paths += %W(#{config.root}/extras)
|
||||||
# config.autoload_paths += %W(#{config.root}/lib)
|
config.autoload_lib(ignore: %w(assets tasks))
|
||||||
config.eager_load_paths += %W(#{config.root}/lib)
|
|
||||||
|
|
||||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Rails.application.configure do
|
||||||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||||
|
|
||||||
# Compress JavaScripts and CSS.
|
# Compress JavaScripts and CSS.
|
||||||
config.assets.js_compressor = :uglifier
|
config.assets.js_compressor = Terser.new
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Rails.application.configure do
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
# Raise exceptions instead of rendering exception templates.
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_dispatch.show_exceptions = false
|
config.action_dispatch.show_exceptions = :none
|
||||||
|
|
||||||
# Disable request forgery protection in test environment.
|
# Disable request forgery protection in test environment.
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mariadb:lts
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
|
||||||
MYSQL_DATABASE: ${TRACKS_DB:-tracks}
|
MARIADB_DATABASE: ${TRACKS_DB:-tracks}
|
||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/mysql
|
- db-data:/var/lib/mysql
|
||||||
web:
|
web:
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
echo "==> Polling DB…"
|
echo "==> Polling DB…"
|
||||||
|
|
||||||
if [ "$1" == "mysql" ]; then
|
if [ -z "$1" ] || [ "$1" == "mysql" ]; then
|
||||||
appdir=$(cd $(dirname "$0")/.. && pwd)
|
appdir=$(cd $(dirname "$0")/.. && pwd)
|
||||||
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@
|
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mariadb:lts
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
|
||||||
MYSQL_DATABASE: ${TRACKS_DB:-tracks}
|
MARIADB_DATABASE: ${TRACKS_DB:-tracks}
|
||||||
web:
|
web:
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue