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 +4 -4
- data/henk/lib/henk/runner.rb +8 -8
- data/sct/lib/sct/commands/dev.rb +6 -1
- data/sct/lib/sct/commands/shell.rb +1 -1
- data/sct/lib/sct/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48f681aafa9124537e7313e47d6fd071e7003b307dae51695ac420b98533489c
|
4
|
+
data.tar.gz: 516ad86cf7bb374b091fe58ed62018c8fec88f4ef434f9744435a3a8735e43e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8946ad1798ee15da692749b6e06cff745b3da0a8e42fcd9e0816856c4582d0c250de169a44c5de64c43d3ba2997f3181a1dc1a5cb1e45c14bce01f8f3280ddd
|
7
|
+
data.tar.gz: 4e37d590ac2ab58e28e5dae05459ab58d0fcd735c14f3974dc99294d2bf7d82b9ed8cb2d97dfe17a8031b1fd38b871e4a3b19cbf697398f100359d613bdf097f
|
data/henk/lib/henk/runner.rb
CHANGED
@@ -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! != "
|
60
|
-
puts "Error: ".red + "Not all required services are running or connected to the cluster (#{connected_to_network}/
|
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
|
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
|
227
|
-
run "docker cp #{dir}/db_encryption.key proactive-config
|
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
|
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
|
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
|
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
|
data/sct/lib/sct/commands/dev.rb
CHANGED
@@ -69,7 +69,12 @@ module Sct
|
|
69
69
|
container = service_spec["container_name"]
|
70
70
|
command = service_spec["command"] || ""
|
71
71
|
|
72
|
-
|
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
|
data/sct/lib/sct/version.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|