generate a index.html from index.tmpl

This commit is contained in:
Marc Carmier 2016-02-13 22:44:05 +01:00
parent 0b98ba02be
commit 8ddf56babc
2 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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;