docker-manager 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dockermanager/commands/deploy.rb +5 -5
- data/lib/dockermanager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95d9b00c1d871e17191fb41936995ce7df89781cdc63d8cd14c35892ea4c059d
|
4
|
+
data.tar.gz: 9ca1f02859df043e7e26849d8d0426ab12f299e6181eb3ec4b879ab640349838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57b83d2f9146102d678c2af004024515b3e832e7fb08a76b23a0ca8d5aa35716877aba113a435a9c705ecb16f9124b6e8ba9574e53394ba6a92e20c8fde3d2df
|
7
|
+
data.tar.gz: b4aedd652b08b74991e2acd5b8b51746d963674258ee6289ac0d720b557c1fb2131dff3ca754ac3b4abf57dd66c0b427325640d095ec36df58ad59519bc1a265
|
@@ -16,14 +16,14 @@ module DockerManager
|
|
16
16
|
env_remote_directory = config.env_remote_directory
|
17
17
|
containers_to_restart = (config.containers_to_restart || []).join(' ')
|
18
18
|
run_locally do
|
19
|
-
execute("rm -fr #{local_git_tmp_path}
|
20
|
-
execute("git clone -b #{env_git_branch} #{git_repository} #{
|
19
|
+
execute("rm -fr #{local_git_tmp_path}")
|
20
|
+
execute("git clone -b #{env_git_branch} #{git_repository} #{local_git_tmp_path}")
|
21
21
|
execute("cp #{local_deploy_path}/#{env}/.env #{local_git_tmp_path}/.env")
|
22
22
|
execute("cp #{local_docker_path}/docker-compose.server.yml #{local_git_tmp_path}")
|
23
23
|
# within doesn't work
|
24
24
|
execute("cd #{local_git_tmp_path} && TAG=#{env_git_branch} docker-compose -f docker-compose.server.yml build")
|
25
25
|
execute("cd #{local_git_tmp_path} && docker login -u #{registry_login} -p '#{registry_password}' #{registry_server}")
|
26
|
-
execute("cd #{local_git_tmp_path} && docker-compose -f docker-compose.server.yml push")
|
26
|
+
execute("cd #{local_git_tmp_path} && TAG=#{env_git_branch} docker-compose -f docker-compose.server.yml push")
|
27
27
|
end
|
28
28
|
on config.env_host do
|
29
29
|
execute(:mkdir, "-p", "#{env_remote_directory}/data")
|
@@ -38,8 +38,8 @@ module DockerManager
|
|
38
38
|
upload!(local_renew_cert_script, "#{env_remote_directory}/renew_cert.sh") if File.readable?(local_renew_cert_script)
|
39
39
|
end
|
40
40
|
execute("docker login -u #{registry_login} -p '#{registry_password}' #{registry_server}")
|
41
|
-
execute("cd #{env_remote_directory} && docker-compose pull -q")
|
42
|
-
execute("cd #{env_remote_directory} && docker-compose up -d #{containers_to_restart}")
|
41
|
+
execute("cd #{env_remote_directory} && TAG=#{env_git_branch} docker-compose pull -q")
|
42
|
+
execute("cd #{env_remote_directory} && TAG=#{env_git_branch} docker-compose up -d #{containers_to_restart}")
|
43
43
|
execute("docker system prune -f")
|
44
44
|
end
|
45
45
|
end
|