capistrano-docker-compose 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/docker-compose-staging.example.yml +9 -0
- data/lib/capistrano/docker/compose/version.rb +1 -1
- data/lib/capistrano/docker/tasks/compose.rake +15 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adc5fbcf7e6564e50a726b1aa54e7b327928ee7a
|
4
|
+
data.tar.gz: f9c97f9be3e6ac09179596344e4809c580bae795
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eb865c71b25d09b599075290aace4d2118f1588ea40b8b11311353c81dedc516d9debcedf540f8b20145efe7b25720dd9461aab31d55bd9a89bf2069d414706
|
7
|
+
data.tar.gz: e1694f7e6d25f9c1165779537204b72fa20f59b4240d3e12467bc1a5bf66c621bf11ba70111b2ad15702aec8b4560ff3355a2d1af1d435cdaa18c48ea15e9b99
|
data/.travis.yml
CHANGED
@@ -12,3 +12,12 @@ services:
|
|
12
12
|
environment:
|
13
13
|
- RAILS_ENV=staging
|
14
14
|
- PASSENGER_APP_ENV=staging
|
15
|
+
db:
|
16
|
+
image: postgres:9.5
|
17
|
+
environment:
|
18
|
+
- POSTGRES_DB=staging
|
19
|
+
- PGDATA=/var/lib/postgresql/data/pgdata
|
20
|
+
- POSTGRES_USER=staging_user
|
21
|
+
- POSTGRES_PASSWORD=soZee4Ig+u1f
|
22
|
+
volumes:
|
23
|
+
- ../../shared/postgresql:/var/lib/postgresql/data/pgdata
|
@@ -43,11 +43,25 @@ namespace :deploy do
|
|
43
43
|
|
44
44
|
task :purge_old_containers do
|
45
45
|
on roles(fetch(:docker_compose_roles)) do
|
46
|
-
if fetch(:previous_release_path)
|
46
|
+
if fetch(:previous_release_path, false)
|
47
47
|
info "Purging previous release containers at #{fetch(:previous_release_path)}"
|
48
|
+
|
49
|
+
release_name = Pathname.new(release_path).basename.to_s
|
50
|
+
web_container_id = capture("docker ps -q --filter 'name=#{release_name}_web'")
|
51
|
+
execute :docker, 'pause', web_container_id
|
52
|
+
|
48
53
|
within fetch(:previous_release_path) do
|
49
54
|
execute :'docker-compose', 'down'
|
50
55
|
end
|
56
|
+
|
57
|
+
db_container_id = capture("docker ps -q --filter 'name=#{release_name}_db'")
|
58
|
+
execute :docker, 'restart', db_container_id
|
59
|
+
|
60
|
+
# Give services 3s to come up
|
61
|
+
# TODO: implement flexibly into options
|
62
|
+
sleep 3
|
63
|
+
|
64
|
+
execute :docker, 'unpause', web_container_id
|
51
65
|
end
|
52
66
|
end
|
53
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-docker-compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ain Tohvri
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.5.1
|
112
|
+
rubygems_version: 2.4.5.1
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Docker Compose specific tasks for Capistrano.
|