forked from 2factorauth/twofactorauth
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docker flow to use nginx instead of jekyll serve
- Loading branch information
Showing
3 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
FROM ruby:2.3.5 | ||
|
||
COPY . /acceptbitcoin | ||
WORKDIR /acceptbitcoin | ||
|
||
RUN bundle install | ||
|
||
EXPOSE 4000 | ||
|
||
CMD [ "jekyll", "serve", "-H", "0.0.0.0"] | ||
FROM nginx | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY _site/ /usr/share/nginx/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
server { | ||
listen 80; | ||
server_name acceptbitcoin.cash; | ||
|
||
if ( $http_x_forwarded_proto = 'http' ) { | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
root /usr/share/nginx/html; | ||
|
||
location / { | ||
index index.html; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
|
||
## Compression. | ||
gzip on; | ||
gzip_buffers 16 8k; | ||
gzip_comp_level 1; | ||
gzip_http_version 1.1; | ||
gzip_min_length 10; | ||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon application/vnd.ms-fontobject font/opentype application/x-font-ttf; | ||
gzip_vary on; | ||
gzip_proxied any; # Compression for all requests. | ||
## No need for regexps. See | ||
## http://wiki.nginx.org/NginxHttpGzipModule#gzip_disable | ||
gzip_disable msie6; |