deployku 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfe59e855f60f211b591d800f31a729fe253735e
4
- data.tar.gz: 0c413f1ebc00d71e88b727a1929d1eb39d6dea84
3
+ metadata.gz: 0e661ae5dab03eea96e83e1111823dc20fbddbc3
4
+ data.tar.gz: 9b8ec41b8aedd20c244e94e5035fe699274541e0
5
5
  SHA512:
6
- metadata.gz: ee135823a37281fc4cd377ded1c5bb522d9c295203d8e02237505f4f89c3b93b4bba685d7997c59b57e28b2654fad615b68ef8636baca70ddcff7361b32215db
7
- data.tar.gz: 5c38b6c78b376b3e093dc06273988c66e0f778e487e8516ca43a962dee7b7bed1db9a01ad73d705079a24f2694d115fb9e3e948e90348cad00a413f27a1f72d2
6
+ metadata.gz: 4fbe627f31cb9d54dc25f92284261bf262d8816b9db26b0a3e20966548f76e31908ae134376e31066e92439c30c1a39b4eda633724de00bc925db7b267064c45
7
+ data.tar.gz: e330a1f96280912c65a02dceb1b87f6293c9901f5740c45c31bc2d3a3b34099ba38f9d157105a9a48d9e27b5c0899f9a942a3d19faff1dfcad62461974745f12
data/README.md CHANGED
@@ -12,6 +12,7 @@ Deploy applications using git with zero down time. Inspired by dokku but should
12
12
  * nginx (server)
13
13
  * sshd (server)
14
14
  * git
15
+ * sudo
15
16
 
16
17
  ### Installation
17
18
 
@@ -36,7 +37,7 @@ http {
36
37
 
37
38
  To allow user deployku to reload nginx configuration via sudo add following line to /etc/sudoers
38
39
  ```bash
39
- %deployku ALL=(ALL) NOPASSWD:/usr/bin/nginx -s reload
40
+ %deployku ALL=(ALL) NOPASSWD:/usr/sbin/nginx -s reload
40
41
  ```
41
42
 
42
43
  Store path to deployku into ~deployku/.sshcommand:
@@ -48,6 +49,7 @@ As user deployku add first ssh key. The first user will be manager and will have
48
49
  The command reads one line from stdin and expects the line to be a public ssh key. So you can do something like this:
49
50
  ```bash
50
51
  su - deployku
52
+ mkdir ~/.ssh
51
53
  cat id_rsa.pub | deployku access:add peter
52
54
  ```
53
55
 
@@ -157,12 +159,12 @@ ssh deployku@localhost app:create myapp
157
159
 
158
160
  Create new database on running database server
159
161
  ```bash
160
- ssh deployku@localhost postgres:db:create dbserver myapp-db
162
+ ssh deployku@localhost postgres:db:create dbserver myappdb
161
163
  ```
162
164
 
163
165
  Link created database to our application
164
166
  ```bash
165
- ssh deployku@localhost postgres:db:link dbserver myapp-db myapp
167
+ ssh deployku@localhost postgres:db:link dbserver myappdb myapp
166
168
  ```
167
169
 
168
170
  To say that we want to install postgresql dev tools in our container you can create file `deployku.yml` in your
@@ -194,6 +196,7 @@ ssh deployku@localhost app:config:show myapp
194
196
 
195
197
  Setup application environment like SECRET_KEY_BASE for rails app
196
198
  ```bash
199
+ bundle exec rake secret
197
200
  ssh deployku@localhost app:config:set myapp SECRET_KEY_BASE somesecretkey
198
201
  ```
199
202
 
@@ -210,7 +213,7 @@ git push deployku master
210
213
  ### Connect to database
211
214
  Use ssh with `-t` option.
212
215
  ```bash
213
- ssh -t deployku@localhost postgres:db:connect dbserver myapp-db
216
+ ssh -t deployku@localhost postgres:db:connect dbserver myappdb
214
217
  ```
215
218
 
216
219
  ### Exec command in container environment
data/deployku.gemspec CHANGED
@@ -13,7 +13,7 @@ spec = Gem::Specification.new do |s|
13
13
  s.email = "pejuko@gmail.com"
14
14
  s.authors = ["Petr Kovář"]
15
15
  s.name = 'deployku'
16
- s.version = '0.0.1'
16
+ s.version = '0.0.2'
17
17
  s.date = Time.now.strftime("%Y-%m-%d")
18
18
  s.require_path = 'lib'
19
19
  s.files = ["bin/deployku", "README.md", "deployku.gemspec", "Rakefile", "LICENSE"]
@@ -27,7 +27,7 @@ module Deployku::Containerable
27
27
  old_cid = get_container_id(app_name)
28
28
  if start(app_name)
29
29
  # stops old application only if new instance was spawn
30
- stop(app_name, cid: old_cid)
30
+ stop(app_name, cid: old_cid) if old_cid
31
31
  end
32
32
  end
33
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Kovář