Skip to content

Commit

Permalink
Merge pull request #4 from willrstern/4-default-server
Browse files Browse the repository at this point in the history
default server
  • Loading branch information
willrstern committed Mar 1, 2016
2 parents 790dda6 + 49326bc commit f8fdf62
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./docker-cloud-watch /usr/local/bin/docker-cloud-watch
RUN chmod +x /usr/local/bin/docker-cloud-watch
COPY ./lib /app/lib
COPY ./default.crt /certs/default.crt

EXPOSE 80

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ COPY ./docker-cloud-watch /usr/local/bin/docker-cloud-watch
RUN chmod +x /usr/local/bin/docker-cloud-watch
COPY ./lib /app/lib
COPY ./test /app/test
COPY ./default.crt /certs/default.crt

ENV NGINX_LB_NAME=test
ENV NGINX_RELOAD=false
Expand Down
28 changes: 28 additions & 0 deletions default.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC/G6eud0cQqqI729F+uxT1Zv1HLpqz/qOc/3GjtZohNUyOCJK0
goiiNwz9nNy62Q3iAknW/EP6TKNfiN1AFNsqECsxOku0mUAyvERLeBfWpXVXTi27
7ml7KXoVhhDxPj3/PDsgyvrEsQ8e9/jDvkzovSKyfMJa0shbi6gwzJr+awIDAQAB
AoGBAK0yoBZzDVnieyOqxcOIQ6dgjlzrtNM6DQglTdVjqWs9RcNXq7Wis7foEoLq
nfVM79ML5eXMPMNkn4/elz4TaMe1tQKzeevy7waLEjLDlrtqQs4duX4ulUhQvDr2
ZnWLiaoGIN/K+QnHzR1k7Kj07sT8PL3gIwqtqRdDBSO4ljIRAkEA6wMZ/OxKJCH6
lKQ3C+7wlXttmBhkGQpzjvC0E8yJFR2ui/SCn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AM0/z4gJ67JZ
oAPJD828GizKayML5BIu3hQSufiy
-----END CERTIFICATE-----
15 changes: 9 additions & 6 deletions lib/nginx-template.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import hogan from "hogan.js"

export default hogan.compile(`
#server {
# listen 80 default_server;
# listen 443 ssl default_server;
server {
listen 80 default_server;
listen 443 ssl default_server;
# server_name _;
server_name _;
# return 404;
#}
ssl_certificate /certs/default.crt;
ssl_certificate_key /certs/default.crt;
return 404;
}
{{#configs}}
# {{host}}
Expand Down

0 comments on commit f8fdf62

Please sign in to comment.