capun 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/capun/setup.rb +1 -1
- data/lib/capun/version.rb +1 -1
- data/lib/generators/capun/templates/nginx.conf.erb +9 -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: ea9be592ab5fe391b9b42ec743d596ac1a12d38d
|
4
|
+
data.tar.gz: 6fc489eb10deb4d4b2026bd1501fd9a394acefdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d3fb9cb09b6f9bc87e777858cda08752aa021cf4833efcce2552f85c1867dea15690d45c9e1558702285353c2d22e142fa87142e53f685923bffdaeeb4c9c2b
|
7
|
+
data.tar.gz: f4e47cb7e135bada2e79b34a63550eb4d7b8ef734f93a63db7ed9e304a16b6714b80827c87779950d336bfb56911b707af7329cb280324b564220d1fea44007f
|
data/README.md
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
###Prerequisites
|
5
5
|
|
6
6
|
We expect you to have the following things setup before you run `cap staging|production|beta|etc deploy`:
|
7
|
-
* linux server with a ssh user
|
7
|
+
* linux server with a ssh user (should be configured as passwordless sudo, [see this serverfault.com article for instructions](http://serverfault.com/questions/160581/how-to-setup-passwordless-sudo-on-linux))
|
8
|
+
* Node.js installed (e.g. `sudo apt-get install -y nodejs && sudo ln -sf /usr/bin/nodejs /usr/local/bin/node` for Debian 8 Jessie)
|
8
9
|
* `nginx` installed in the `/etc/nginx` directory
|
9
10
|
* dedicated host (e.g. `beta.example.com`)
|
10
11
|
* `unicorn` gem added to a `Gemfile`
|
@@ -63,6 +64,11 @@ If you upload file with `.erb` extension, it will be precompiled before upload.
|
|
63
64
|
|
64
65
|
If you use [figaro](https://github.com/laserlemon/figaro) gem, `Capun` will pick up `application.yml` file, upload it to `#{shared_path}/config/application.yml` and symlink to `#{release_path}/config/application.yml`. No configuration is required.
|
65
66
|
|
67
|
+
**ELK + logrotate support**
|
68
|
+
|
69
|
+
If you would like to forward your logs to `logstash`, you can enable it by answering 'yes' while generating a new stage. As a result, `lograge` gem and `lograge` configurations will be added along with `logstash` confgurations added and symlinked to `logstash` `conf.d` directory (which is assumed to be at `/etc/logstash/conf.d/`).
|
70
|
+
If you answer 'yes' to 'Would you like to add logrotate configuration to stage?' while generating a new stage, `logrotate` configuration file will be added and symlinked to `/etc/logrotate.d/` directory.
|
71
|
+
|
66
72
|
### Contributing
|
67
73
|
|
68
74
|
1. Fork it ( http://github.com/zamylin/capun/fork )
|
data/lib/capun/setup.rb
CHANGED
@@ -59,7 +59,7 @@ namespace :deploy do
|
|
59
59
|
|
60
60
|
desc 'Uploads files to app based on stage'
|
61
61
|
task :upload do
|
62
|
-
on roles(:app) do
|
62
|
+
on roles(:app) do |server|
|
63
63
|
#create /home/[user]/apps/[app]/shared/config directory, if it doesn't exist yet
|
64
64
|
execute :mkdir, "-p", "#{shared_path}/config"
|
65
65
|
uploads = fetch(:uploads).concat(fetch(:std_uploads))
|
data/lib/capun/version.rb
CHANGED
@@ -4,7 +4,7 @@ upstream unicorn_<%= fetch(:application) %> {
|
|
4
4
|
|
5
5
|
server {
|
6
6
|
server_name <%= fetch(:url) %> www.<%= fetch(:url) %>;
|
7
|
-
listen
|
7
|
+
listen <%= server.hostname %>;
|
8
8
|
|
9
9
|
location / {
|
10
10
|
root /home/<%= fetch(:user) %>/apps/<%= fetch(:application) %>/current/public;
|
@@ -16,7 +16,14 @@ server {
|
|
16
16
|
gzip_static on;
|
17
17
|
expires max;
|
18
18
|
add_header Cache-Control public;
|
19
|
-
access_log
|
19
|
+
access_log off;
|
20
|
+
}
|
21
|
+
|
22
|
+
location /status {
|
23
|
+
stub_status on;
|
24
|
+
access_log off;
|
25
|
+
allow <%= server.hostname %>;
|
26
|
+
deny all;
|
20
27
|
}
|
21
28
|
|
22
29
|
location @unicorn_<%= fetch(:application) %> {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Zamylin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|