harbr 0.1.71 → 0.1.73

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0d01fbdb7a053c4a52579ce6b4867ca233c28d5a76cb3bc83c51c986e5fd0ee
4
- data.tar.gz: d6d2dd32470c7cc5cdc6464745804d8eaab7b254ed8dc7e6afbe0c41d0d5894d
3
+ metadata.gz: 2af05eeb95471c30ca49d2044fa8ff37880d14c523781f6570402b9d13a83648
4
+ data.tar.gz: c37e3f40874254aa84237dc34558fcaf5c805465cc99b965c552da463871e7a4
5
5
  SHA512:
6
- metadata.gz: 2dcb4f63f140a907fc736694182bc59a0b44052a1caadab8e3f975e6663d3bfd82d3fdd3ef72ef67733f5511c2887e819e8cbd396249576c13d2f473680da302
7
- data.tar.gz: eb6fb5923479044c1aa0863b283f64ddefb839875c4ea3e527848e72834bc59f61edec1001b17b909f9125c5fd8e39eebe23bb003d5ec937ff58a58b780c009b
6
+ metadata.gz: df8e612c5e99e600126e6a9b8d3467501dbce9dea55a172ae9e9a5d0f8b0c38fae3da4603f526a20b97757bd1524df6bfde729136b5c5429ab6fc20605117e9a
7
+ data.tar.gz: b8632e8fe04571fa1981733b0953a0de91bd31dee2f963177667cddbcb55457ea64bd8621af4f9321d476a85a424951075d2510ec96c5060e5f75f317df94e9e
data/exe/harbr CHANGED
@@ -190,7 +190,7 @@ class HarbrCLI < Thor
190
190
 
191
191
  log_script = <<~SCRIPT
192
192
  #!/bin/sh
193
- exec svlogd -tt /var/log/harbr/harbr
193
+ exec svlogd -tt /var/log/harbr/
194
194
  SCRIPT
195
195
 
196
196
  write_to_file("/etc/sv/harbr/run", run_script)
@@ -1,7 +1,7 @@
1
1
  module Harbr
2
2
  class Container
3
3
  include Dddr::Entity
4
- attr_accessor :name, :host_header, :ip, :port
4
+ attr_accessor :name, :host_header, :ip, :port, :host_header_aliases
5
5
 
6
6
  queries do
7
7
  def find_by_header(host_header)
data/lib/harbr/job.rb CHANGED
@@ -39,17 +39,21 @@ module Harbr
39
39
  puts "Traefik configuration written to /etc/traefik/harbr.toml"
40
40
  end
41
41
 
42
- def collate_containers(name, host, port)
42
+ def collate_containers(name, host, port, host_header_aliases = [])
43
43
  containers = Harbr::Container::Repository.new
44
44
  container = containers.find_by_header(host)
45
+
46
+ host_header_aliases << host
45
47
 
46
48
  if container.nil?
47
- container = Harbr::Container.new
48
- container.name = name
49
- container.host_header = host
50
- container.ip = "127.0.0.1"
51
- container.port = port
52
- containers.create(container)
49
+ host_header_aliases.each do |host_header_alias|
50
+ container = Harbr::Container.new
51
+ container.name = name
52
+ container.host_header = host_header_alias
53
+ container.ip = "127.0.0.1"
54
+ container.port = port
55
+ containers.create(container)
56
+ end
53
57
  else
54
58
  container.port = port
55
59
  containers.update(container)
data/lib/harbr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Harbr
4
- VERSION = "0.1.71"
4
+ VERSION = "0.1.73"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.71
4
+ version: 0.1.73
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-01 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen