sct 1.9.0 → 1.10.1

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: 78451b6609af64f83b65821da05857810c1ed5c50443502c0a871a764955b74a
4
- data.tar.gz: d23f6b827089ba2f9894d9c1aa7add295af8426d5015b34055ba40da073761c1
3
+ metadata.gz: 48f681aafa9124537e7313e47d6fd071e7003b307dae51695ac420b98533489c
4
+ data.tar.gz: 516ad86cf7bb374b091fe58ed62018c8fec88f4ef434f9744435a3a8735e43e5
5
5
  SHA512:
6
- metadata.gz: 5605aacb5d98155c1e98f52d3eee13f03299aa2412f2d66e5bd55ea38e33e03009dc81b515ed36f008fe4e56b0ff3523b84addbc0911ca3c176aef31644cb39d
7
- data.tar.gz: 92110447814e1a0fb7f325dbac52fb56fc569f37dd0ed559bac647bd949ea6ab3e88c2837ffbd2b7de5d2d50e1bea790efa29141c3fb9fef4131e4101a3fc5d3
6
+ metadata.gz: e8946ad1798ee15da692749b6e06cff745b3da0a8e42fcd9e0816856c4582d0c250de169a44c5de64c43d3ba2997f3181a1dc1a5cb1e45c14bce01f8f3280ddd
7
+ data.tar.gz: 4e37d590ac2ab58e28e5dae05459ab58d0fcd735c14f3974dc99294d2bf7d82b9ed8cb2d97dfe17a8031b1fd38b871e4a3b19cbf697398f100359d613bdf097f
@@ -56,8 +56,8 @@ module Henk
56
56
 
57
57
  connected_to_network = `docker network inspect spend-cloud | jq '.[0] | .Containers | map(select((.Name | test("^#{required_containers.join('|^')}")))) | length'`
58
58
 
59
- if connected_to_network.to_s.strip! != "5"
60
- puts "Error: ".red + "Not all required services are running or connected to the cluster (#{connected_to_network}/5)"
59
+ if connected_to_network.to_s.strip! != "3"
60
+ puts "Error: ".red + "Not all required services are running or connected to the cluster (#{connected_to_network}/3)"
61
61
  exit(1)
62
62
  end
63
63
 
@@ -88,7 +88,7 @@ module Henk
88
88
  def encrypt_config_data domain
89
89
  puts "Manually encrypting config data for #{domain}".green
90
90
  php_command = "php /var/www/scripts/encryptConfigData.php -c='#{domain}' --execute"
91
- command = 'docker exec -it proactive-config-php bash -c "#{php_command}"'
91
+ command = 'docker exec -it proactive-config bash -c "#{php_command}"'
92
92
  self.run command
93
93
  end
94
94
 
@@ -223,10 +223,10 @@ module Henk
223
223
  end
224
224
 
225
225
  def copy_db_encryption_key customer, dir
226
- run "docker exec proactive-config-php mkdir /data/#{customer}"
227
- run "docker cp #{dir}/db_encryption.key proactive-config-php:/data/#{customer}/"
226
+ run "docker exec proactive-config mkdir /data/#{customer}"
227
+ run "docker cp #{dir}/db_encryption.key proactive-config:/data/#{customer}/"
228
228
 
229
- puts "Copied db_encryption.key to proactive-config-php:/data/#{customer}/".green
229
+ puts "Copied db_encryption.key to proactive-config:/data/#{customer}/".green
230
230
  end
231
231
 
232
232
  def run_sql_files dir
@@ -249,7 +249,7 @@ module Henk
249
249
  def add_customer_account customer, customer_database
250
250
  account_data = "\n[#{customer}]\ndatabase = #{customer_database}\ndomain = NULL\nrewrite = #{customer}\nimport_planning = 1\njobs = 1\nscan_upload = 0\nfiatteren_mailbox = 1\ncontracten_mailbox = 1"
251
251
 
252
- run "docker exec proactive-config-php sh -c 'echo \"#{account_data}\" >> /data/proactive_accounts.ini'"
252
+ run "docker exec proactive-config sh -c 'echo \"#{account_data}\" >> /data/proactive_accounts.ini'"
253
253
 
254
254
  puts "Added account to proactive_accounts.ini".green
255
255
  end
@@ -269,7 +269,7 @@ module Henk
269
269
 
270
270
  puts "Updated config values".green
271
271
 
272
- run "docker exec proactive-config-php php /var/www/scripts/encryptConfigData.php -c='#{customer}' --execute"
272
+ run "docker exec proactive-config php /var/www/scripts/encryptConfigData.php -c='#{customer}' --execute"
273
273
 
274
274
  puts "Encrypted config values".green
275
275
  end
@@ -69,7 +69,12 @@ module Sct
69
69
  container = service_spec["container_name"]
70
70
  command = service_spec["command"] || ""
71
71
 
72
- dc_dev "run --rm --service-ports --name #{container} #{service} #{command}", env
72
+ begin
73
+ dc_dev "up --remove-orphans --force-recreate --always-recreate-deps", env
74
+ rescue Interrupt
75
+ # user pressed Ctrl+C, do nothing
76
+ end
77
+ dc_dev "down --remove-orphans", env
73
78
  else
74
79
  begin
75
80
  dc_dev "up --remove-orphans --force-recreate --always-recreate-deps", env
@@ -9,7 +9,7 @@ module Sct
9
9
  end
10
10
 
11
11
  def execute args, options
12
- command = args.empty? ? "sh" : args.join(" ")
12
+ command = args.empty? ? "bash" : args.join(" ")
13
13
 
14
14
  file = "docker-compose.dev.yml"
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Sct
2
- VERSION = "1.9.0"
2
+ VERSION = "1.10.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reshad Farid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2024-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored