Add some docker magick to drb_counter

This commit is contained in:
2022-02-07 19:38:14 -05:00
parent e4ad210036
commit 073cc9452e
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -71,7 +71,8 @@ class InMemoryQCounter
puts "Environment: #{environment.inspect}"
#couch_settings = YAML.load_file(couch_settings_path)[environment]
couch_settings = YAML.safe_load(ERB.new(File.read(couch_settings_path)).result, [Symbol], [], ['default'])[environment]
database = couch_settings['database']
database = couch_settings['database'].sub 'localhost', 'host.docker.internal'
#database = couch_settings['database'].sub 'localhost', '172.17.0.1'
db = CouchRest.database(database) # for debug: db = CouchPotato.database.couchrest_database
design_doc = "_design/order_counter"
view_path = File.join design_doc, "_view/by_supplier_id_and_state"