capistrano-container-db 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -12
- data/capistrano-container-db.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6329984c7c290ed95ac3328fb8c6235a7a5d950b
|
4
|
+
data.tar.gz: 25c9226e10aa0aba6ff49350f80bffc232543bb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfc3672495ff77d1744288fb276dd269b6471bc6c947d7e440326240e9e960ba4760756350cb20ed3b2f8612566c8259ffeedea2092d2ebf7bfb54aeeb20339b
|
7
|
+
data.tar.gz: a565b87674d837c868d0953250421e08b1128397012e84d661db5f3ba2b672fdcd489d21aa53edbabe5fa224823bcdec322e197d34bf09563b8a41391199772a
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ This gem depends on [capistrano-container](https://github.com/creative-workflow/
|
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
|
-
Add this line to your application's Gemfile:
|
11
|
+
Add this line to your application's `Gemfile` (make sure you have installed ruby and bundler ;):
|
12
12
|
|
13
13
|
```ruby
|
14
14
|
gem 'capistrano', '>= 3.0.0'
|
@@ -31,19 +31,18 @@ require 'capistrano/container/db'
|
|
31
31
|
|
32
32
|
## Usage
|
33
33
|
### definition
|
34
|
-
|
34
|
+
Define and register a container by doing the following in your `deploy.rb` (or `[stage].rb`):
|
35
35
|
|
36
36
|
```ruby
|
37
37
|
...
|
38
38
|
|
39
|
-
|
40
|
-
server('www.example.com', user: 'root', roles: %w{web})
|
39
|
+
server 'www.example.com', user: 'root', roles: %w{web}
|
41
40
|
|
42
41
|
container 'db', roles: %w{db},
|
43
42
|
container_id: 'website_company_beta_db',
|
44
43
|
server: ['www.example.com']
|
45
44
|
|
46
|
-
# here the capistrano-container-db config
|
45
|
+
# here is the capistrano-container-db config you need
|
47
46
|
|
48
47
|
set :db_is_container, true
|
49
48
|
set :db_user, 'wordpress'
|
@@ -53,11 +52,11 @@ set :db_name, 'my_wordpress_db_inside_docker'
|
|
53
52
|
...
|
54
53
|
```
|
55
54
|
|
56
|
-
This configures the db access for the db container. If
|
55
|
+
This configures the db access for the db container. If `:db_is_container` is true, the gem uses the `capistrano-container` extension to select the container by name `fetch(:db_container_name)` (defaults to 'db').
|
57
56
|
|
58
|
-
If the stage name is equal
|
57
|
+
If the stage name is equal `:local`, export/import tasks will run on your local host (no matter if it's a dockaer container or local mysql installation).
|
59
58
|
|
60
|
-
|
59
|
+
Dont forget to add a server (even for local stage) with the role `db`. `server 'localhost', user: 'any', roles: %w{web db php}`
|
61
60
|
|
62
61
|
### commandline tasks
|
63
62
|
```ruby
|
@@ -75,14 +74,17 @@ set :db_local_dump, 'config/db/dump.sql'
|
|
75
74
|
set :db_is_container, false
|
76
75
|
set :db_container_name, 'db'
|
77
76
|
set :local_stage_name, :local
|
78
|
-
set :filter_on_import, lambda{ |sql_dump| return sql_dump }
|
77
|
+
set :filter_on_import, lambda{ |sql_dump| return sql_dump } -> !not implemented yet
|
79
78
|
```
|
80
79
|
|
81
80
|
## TODO
|
82
|
-
*
|
83
|
-
*
|
81
|
+
* adapter pattern for other db engines.
|
82
|
+
* integration tests.
|
84
83
|
|
85
84
|
## Changes
|
85
|
+
### Version 0.0.4
|
86
|
+
* readme
|
87
|
+
|
86
88
|
### Version 0.0.3
|
87
89
|
* remove debug expression
|
88
90
|
|
@@ -90,7 +92,7 @@ set :filter_on_import, lambda{ |sql_dump| return sql_dump }
|
|
90
92
|
* autodetect local and remote container
|
91
93
|
|
92
94
|
### Version 0.0.1
|
93
|
-
*
|
95
|
+
* initial release
|
94
96
|
|
95
97
|
## Contributing
|
96
98
|
|
@@ -4,8 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-container-db'
|
7
|
-
spec.version = '0.0.
|
8
|
-
spec.date = '2016-09-
|
7
|
+
spec.version = '0.0.4'
|
8
|
+
spec.date = '2016-09-30'
|
9
9
|
spec.summary = 'Helps managing databases on local and remote stages, also on remote docker container'
|
10
10
|
spec.description = spec.summary
|
11
11
|
spec.authors = ['Tom Hanoldt']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-container-db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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-09-
|
11
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|