Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
icco committed Sep 26, 2017
1 parent cbf128a commit 5998003
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ruby:2.4.2

COPY . .
RUN bundle install
RUN bundle exec middleman build

FROM nginx:latest

COPY nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html
COPY --from=0 build/ .
RUN ls -alh
EXPOSE 8080
22 changes: 22 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
server {
listen 8080;
root /usr/share/nginx/html;
server_tokens off;
charset utf-8;

location / {
index index.html index.htm;

#if ($http_x_forwarded_proto != "https") {
# rewrite ^(.*)$ https://$host$1 permanent;
#}

expires 1h;

add_header Cache-Control "public";
add_header Strict-Transport-Security "max-age=31536000;";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
}
}

0 comments on commit 5998003

Please sign in to comment.