foreman-export-nginx 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -1
- data/data/export/nginx/nginx.erb +9 -5
- data/foreman-export-nginx.gemspec +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Foreman::Export::Nginx
|
2
2
|
|
3
|
-
Export Nginx configuration files using Foreman
|
3
|
+
Export Nginx configuration files using Foreman.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,6 +20,14 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
`nginx-foreman export nginx [additonal options]`
|
22
22
|
|
23
|
+
There is one requied and several optional environment variables:
|
24
|
+
|
25
|
+
* `BASE_DOMAIN` **required** The nginx `server_name` will be set to `app_name.base_domain`. For example: `appname.example.com` if `BASE_DOMAIN=example.com`.
|
26
|
+
* `ADDITIONAL_DOMAINS` any additional domains to listen for.
|
27
|
+
* `USE_SSL` listen on ssl
|
28
|
+
* `SSL_CERT_PATH` path to the certificate to use for ssl. Optional if you've set up a wildcard cert.
|
29
|
+
* `SSL_KEY_PATH` path to the certificate key. Required if you specified `SSL_CERT_PATH`.
|
30
|
+
|
23
31
|
## Contributing
|
24
32
|
|
25
33
|
1. Fork it
|
data/data/export/nginx/nginx.erb
CHANGED
@@ -11,13 +11,17 @@ server {
|
|
11
11
|
listen 80;
|
12
12
|
server_name <%= app %>.<%= ENV['BASE_DOMAIN'] %> <%= (ENV['ADDITIONAL_DOMAINS'] || '').split(',').join(' ') %>;
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
<% if ENV['USE_SSL'] %>
|
15
|
+
listen 443 ssl;
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
<% if ENV['SSL_CERT_PATH'] && ENV['SSL_KEY_PATH'] %>
|
18
|
+
ssl_certificate <%= ENV['SSL_CERT_PATH'] %>;
|
19
|
+
ssl_certificate_key <%= ENV['SSL_KEY_PATH'] %>;
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<% end %>
|
20
23
|
|
24
|
+
root <%= engine.root %>/public;
|
21
25
|
|
22
26
|
try_files $uri/index.html $uri.html $uri @app;
|
23
27
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "foreman-export-nginx"
|
7
|
-
gem.version = '0.0.
|
7
|
+
gem.version = '0.0.10'
|
8
8
|
gem.authors = ["Pete Keen"]
|
9
9
|
gem.email = ["pete@bugsplat.info"]
|
10
10
|
gem.description = %q{Export Nginx configs using Foreman}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-export-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: foreman
|