Overhauled configuration so that it's a bit more useful in more spots; configuration now properly loads an environment config as well as defaults; updated some woodpecker config
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-08-12 23:47:38 -04:00
parent 164eea1bde
commit eeedc57cd3
9 changed files with 42 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
database:
adapter: 'sqlite'
database: 'data/gamedata.db'
server:
host: '0.0.0.0'
port: '9292'
testing:
minimum_results_required: 3

3
config/development.yaml Normal file
View File

@@ -0,0 +1,3 @@
database:
adapter: 'sqlite'
database: 'data/gamedata.db'

View File

@@ -3,7 +3,9 @@ directory app_dir
environment ENV.fetch('RACK_ENV', 'development')
bind 'tcp://0.0.0.0:9292'
require_relative '../src/config'
conf = Config.new()
bind "tcp://#{conf.get('server.host')}:#{conf.get('server.port')}"
workers 2
threads 1, 5

3
config/testing.yaml Normal file
View File

@@ -0,0 +1,3 @@
database:
adapter: 'sqlite'
database: 'data/gamedata_testing.db'