Initial add of cloud-demo

This commit is contained in:
Brendan Burns
2014-06-23 22:21:13 -07:00
parent 14838df51e
commit 23c971605e
12 changed files with 497 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
FROM dockerfile/nginx
ADD data.json /usr/share/nginx/html/data.json
ADD default /etc/nginx/sites-available/default
RUN chmod a+r /usr/share/nginx/html/data.json
CMD ["nginx"]

View File

@@ -0,0 +1,3 @@
{
"color": "#0FF"
}

View File

@@ -0,0 +1,23 @@
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
try_files $uri $uri/ =404;
expires 0;
add_header Cache-Control private;
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
}
}