capistrano-container 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 1b651e108dd83aaa200aad9f5576445e75cfeccb
4
- data.tar.gz: 2a036295642ac2ea8a09fbe82549d394fa4c28e3
3
+ metadata.gz: 3646c958ec3169da5b3f0cd4916e05cfe0db6cec
4
+ data.tar.gz: 35a7965e274971b813e1b1ec2f1109acb801e90f
5
5
  SHA512:
6
- metadata.gz: e4be7aa7fc3703d844cc898ad5775d9a436dfcf061010f81de94519ac41bffdf22946413fe5a973e4f8a0e7e6f15e042fd39dae2cb0c788887728e23aa27bac2
7
- data.tar.gz: 98ce9c8497aa0bfe6613da4c768cb9c8a605365c345314d52457389380e9d6fe4d8dbff195c2629e1e3c095d8d1c587750aaa1ab94f18e1b8fcf5b75b2a7cd31
6
+ metadata.gz: 969e4c33c68c9bae39e6ccfce824fe66b368fe8ddbab37f1f68a0fbb2730012ccfe505470f223c396cecdbc8e88cf335d1b2b6b983da06777f31ee96ca11d813
7
+ data.tar.gz: 7f80e35576be85a3327c7bd296336748086e76b362c3f2a7a436d8dd02008f40bf9cf1e36672f60b8b929be9ff55545971ba313f2131b05ebae83c627f85de5d
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # Capistrano::Container [![Gem Version](https://badge.fury.io/rb/capistrano-container.svg)](http://badge.fury.io/rb/capistrano-container)
1
+ # Capistrano::Container [![Gem Version](https://badge.fury.io/rb/capistrano-container.svg)](https://badge.fury.io/rb/capistrano-container)
2
2
 
3
3
  Helps managing [docker]() container and files inside docker container for Capistrano 3.x.
4
4
 
5
- This project is in an early stage but helps me alot dealing with my container deployments and keeps my code clean. It is not only ment for docker, but at the moment there only supports docker, feel free to ditribute =)
5
+ This project is in an early stage but helps me alot dealing with my container deployments and keeps my code clean. It is not only ment for docker, but at the moment it only supports docker, feel free to distribute =)
6
6
 
7
7
  This gem does not handle Dockerfiles or such things, for that there are enough capistrano modules available.
8
8
 
9
9
  ## Installation
10
10
 
11
- Add this line to your application's Gemfile:
11
+ Add this lines to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
14
  gem 'capistrano', '>= 3.0.0'
@@ -31,7 +31,7 @@ require 'capistrano/container'
31
31
 
32
32
  ## Usage
33
33
  ### definition
34
- To define and register a container do the following in you stage config or deploy.rb:
34
+ To define and register a container do the following in your stage config or deploy.rb:
35
35
 
36
36
  ```ruby
37
37
  ...
@@ -51,9 +51,9 @@ container 'php', roles: %w{php},
51
51
 
52
52
  This registers two container (db, php) for the server www.example.com. The roles can later be used to filter container like the way you filter server in capistrano.
53
53
 
54
- The container id is optional. If not set the ontainer id is equal to the name you give the container as first argument. The container id will later be used to run docker commands.
54
+ The container id is optional. If not set, the container id is equal to the name you give the container as first argument. The container id will later be used to run docker commands.
55
55
 
56
- If you define a container, the given hosts get the role `:container_host` behind the scenes, so you can filter hosts that running container. Also a container specific role will be added, fo container named php `:container_php`.
56
+ If you define a container, the role `:container_host` will be added to the given hosts, so you can filter hosts that are running container. Also a container specific role will be added, for a container named php `:container_php`.
57
57
 
58
58
 
59
59
  ### commandline tasks
@@ -77,7 +77,7 @@ cap container:unpause # unpause a docker container
77
77
  cap container:update_docker # update docker
78
78
  ```
79
79
 
80
- For every registered container also specific tasks will be registered. For a container named php the following tasks will be available. (With `cap -T` you will the container specific tasks only see if you register your container in the deploy.rb)
80
+ For every registered container, individual tasks will be creazed. For a container named php the following tasks will be available. (With `cap -T` you can see the container specific tasks, but only if you register your container in the deploy.rb and not in the stage file)
81
81
 
82
82
  ```ruby
83
83
  cap container:php:delete # delete a docker container
@@ -108,7 +108,7 @@ after :deploy, :updated do
108
108
  end
109
109
  end
110
110
  ```
111
- This filter container with the role `:php` and invokes the task `container:#{container.name}:restart`.
111
+ This filters container with the role `:php` and invokes the task `container:#{container.name}:restart`.
112
112
 
113
113
  Or inside other tasks
114
114
  ```ruby
@@ -117,7 +117,9 @@ Or inside other tasks
117
117
  container = container_by_id 'website_company_beta_db'
118
118
  ```
119
119
 
120
- A container instance has the following methods:
120
+ Note that you have to use this commands inside a SSHKit context, means inside a `on roles :containers_host do` block for example.
121
+
122
+ A container has the following methods:
121
123
  ```ruby
122
124
  # tests if the container has a specific role
123
125
  def has_role?(role)
@@ -142,10 +144,14 @@ A container instance has the following methods:
142
144
  ```
143
145
 
144
146
  ## TODO
145
- * Implement provider pattern for other container manager.
146
147
  * Write tests.
148
+ * Implement provider pattern for other container manager.
147
149
 
148
150
  ## Changes
151
+ ### Version 0.0.3
152
+ * use sh instead of bash for docker exec
153
+ * use correct github url
154
+
149
155
  ### Version 0.0.2
150
156
  * Initial release
151
157
 
@@ -4,14 +4,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'capistrano-container'
7
- spec.version = '0.0.2'
8
- spec.date = '2016-06-08'
7
+ spec.version = '0.0.3'
8
+ spec.date = '2016-09-26'
9
9
  spec.summary = 'Helps managing docker container and files inside docker container for Capistrano 3.x'
10
10
  spec.description = spec.summary
11
11
  spec.authors = ['Tom Hanoldt']
12
12
  spec.email = ['tom@creative-workflow.berlin']
13
13
  spec.files = ['lib/hola.rb']
14
- spec.homepage = 'https://gihub.com/creative-workflow/capistrano-container'
14
+ spec.homepage = 'https://github.com/creative-workflow/capistrano-container'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files`.split($/)
@@ -50,7 +50,7 @@ class Instance
50
50
  end
51
51
 
52
52
  def execute(command)
53
- command = "docker exec -i #{container_id} bash -c '#{command.gsub("'", "\'")}'"
53
+ command = "docker exec -i #{container_id} sh -c '#{command.gsub("'", "\'")}'"
54
54
 
55
55
  @dsl.execute(command)
56
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Hanoldt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-08 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -64,7 +64,6 @@ files:
64
64
  - Gemfile
65
65
  - LICENSE
66
66
  - README.md
67
- - README0.md
68
67
  - Rakefile
69
68
  - capistrano-container.gemspec
70
69
  - lib/capistrano-container.rb
@@ -73,7 +72,7 @@ files:
73
72
  - lib/capistrano/container/manager.rb
74
73
  - lib/capistrano/container/mixins.rb
75
74
  - lib/capistrano/tasks/container.rb
76
- homepage: https://gihub.com/creative-workflow/capistrano-container
75
+ homepage: https://github.com/creative-workflow/capistrano-container
77
76
  licenses:
78
77
  - MIT
79
78
  metadata: {}
@@ -93,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
92
  version: '0'
94
93
  requirements: []
95
94
  rubyforge_project:
96
- rubygems_version: 2.4.6
95
+ rubygems_version: 2.5.1
97
96
  signing_key:
98
97
  specification_version: 4
99
98
  summary: Helps managing docker container and files inside docker container for Capistrano
data/README0.md DELETED
@@ -1,74 +0,0 @@
1
- # Capistrano::pm2 [![Gem Version](https://badge.fury.io/rb/capistrano-pm2.svg)](http://badge.fury.io/rb/capistrano-pm2)
2
-
3
- nodejs [pm2](https://github.com/Unitech/pm2) support for Capistrano 3.x
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'capistrano', '~> 3.1.0'
11
- gem 'capistrano-pm2'
12
- ```
13
-
14
- And then execute:
15
-
16
- $ bundle
17
-
18
- Or install it yourself as:
19
-
20
- $ gem install capistrano-pm2
21
-
22
- ## Usage
23
-
24
- Require in `Capfile` to use the default task:
25
-
26
- ```ruby
27
- require 'capistrano/pm2'
28
- ```
29
-
30
- The task will run before `deploy:restart` as part of Capistrano's default deploy,
31
- or can be run in isolation with `cap production pm2:restart`. You can also invoke it in your `deploy.rb`:
32
- ```ruby
33
- namespace :deploy do
34
- desc 'Restart application'
35
- task :restart do
36
- # invoke 'npm:install'
37
- invoke 'pm2:restart'
38
- end
39
-
40
- after :publishing, :restart
41
- end
42
- ```
43
-
44
-
45
- Available Tasks
46
- ```ruby
47
- cap pm2:delete # Delete pm2 application
48
- cap pm2:list # Show pm2 application info
49
- cap pm2:logs # Watch pm2 logs
50
- cap pm2:restart # Restart app gracefully
51
- cap pm2:setup # Install pm2 via npm on the remote host
52
- cap pm2:start # Start pm2 application
53
- cap pm2:status # List all pm2 applications
54
- cap pm2:stop # Stop pm2 application
55
- cap pm2:save # Save pm2 state so it can be loaded after restart
56
- ```
57
-
58
- Configurable options:
59
- ```ruby
60
- set :pm2_app_command, 'main.js' # default, runs main.js
61
- set :pm2_app_name, nil # app name for pm2, default cap :application
62
- set :pm2_target_path, -> { release_path.join('subdir') } # default not set
63
- set :pm2_roles, :all # default, cap roles to run on
64
- set :pm2_env_variables, {} # default, env vars for pm2
65
- set :pm2_start_params, '' # default, pm2 start params see http://pm2.keymetrics.io/docs/usage/quick-start/#cheat-sheet
66
- ```
67
-
68
- ## Contributing
69
-
70
- 1. Fork it
71
- 2. Create your feature branch (`git checkout -b my-new-feature`)
72
- 3. Commit your changes (`git commit -am 'Add some feature'`)
73
- 4. Push to the branch (`git push origin my-new-feature`)
74
- 5. Create new Pull Request