diff --git a/Dockerfile b/Dockerfile index 4917693..e491fe1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.test b/Dockerfile.test index 39f5a37..a552854 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -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 diff --git a/default.crt b/default.crt new file mode 100644 index 0000000..075a658 --- /dev/null +++ b/default.crt @@ -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/SCnvL75OD5+2pDUGpoXaIeCXDAisWN +Ai/KZ9bF2QJBANAszwEUeU1cjf6vPTxrLOzcVLZSdgr3NBe8IAUtE46jL3rdfWlQ +AYPmXfmRynLk8hZM3LgJFM1gO8JrFTJBp+MCQE3UUR76AfPFbP8dAz3oe7SFk93y +9fN1CqAkBv8nlZ5wngWrjDansdQyzZb9sh1HoBiiP+BQfvN2SSSYPyf0cMECQQC2 +kQV92fnDyc7Rs9eNXCTLGTPFra3OUhvCUP736x9CsYRbSVHKARtDFM4HqD8W4ggZ +XJEZaQVwU9w01fqB16inAkBW5FWZixHCqHrDHMKevB+VRGtr94s0yOAxUZPPEAT/ +wIBs4GGlzYk6sPgp8vMOHCtoox2JjzzgiZCsU2HObLS/ +-----END RSA PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIIB8TCCAVoCCQCrK/E7Wz0CxTANBgkqhkiG9w0BAQUFADA9MQswCQYDVQQGEwJV +UzELMAkGA1UECBMCVFgxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 +ZDAeFw0xNjAyMjMxNzUxMzBaFw0xNzAyMjIxNzUxMzBaMD0xCzAJBgNVBAYTAlVT +MQswCQYDVQQIEwJUWDEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRk +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/G6eud0cQqqI729F+uxT1Zv1H +Lpqz/qOc/3GjtZohNUyOCJK0goiiNwz9nNy62Q3iAknW/EP6TKNfiN1AFNsqECsx +Oku0mUAyvERLeBfWpXVXTi277ml7KXoVhhDxPj3/PDsgyvrEsQ8e9/jDvkzovSKy +fMJa0shbi6gwzJr+awIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAAQG+EhyuEQleHRg +uZZnGKIYbeODAWTY4UOVNjV2AItHWk/yPDbPoxhj9e1iC7JdKHgJTLaJw0JzLuXx +mPvyczvXfORsTv0Isc3JH71xhZ2GLX10rhQKBzIzud6CwopFmfdAAM0/z4gJ67JZ +oAPJD828GizKayML5BIu3hQSufiy +-----END CERTIFICATE----- diff --git a/lib/nginx-template.js b/lib/nginx-template.js index 46e5a3d..054ed80 100644 --- a/lib/nginx-template.js +++ b/lib/nginx-template.js @@ -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}}