From 8ddf56babc140fc60fa450266c928a65e1b17201 Mon Sep 17 00:00:00 2001 From: Marc Carmier Date: Sat, 13 Feb 2016 22:44:05 +0100 Subject: [PATCH] generate a index.html from index.tmpl --- Procfile | 3 ++- nginx.tmpl | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Procfile b/Procfile index 8547156..d9aca09 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,3 @@ nginx: nginx -dockergen: docker-gen -watch -only-exposed -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf +gennginx: docker-gen -watch -only-exposed -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf +genindex: docker-gen -watch -only-exposed /app/index.tmpl /usr/share/nginx/html/index.html diff --git a/nginx.tmpl b/nginx.tmpl index 255cc35..08a947d 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -55,7 +55,10 @@ server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 80; access_log /var/log/nginx/access.log vhost; - return 503; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } } {{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} @@ -63,7 +66,10 @@ server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 443 ssl http2; access_log /var/log/nginx/access.log vhost; - return 503; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } ssl_certificate /etc/nginx/certs/default.crt; ssl_certificate_key /etc/nginx/certs/default.key;