Created
November 6, 2016 04:44
-
-
Save hfm/faa40ce3837f96731aa8fdc63ded0d65 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| .git | |
| .DS_Store | |
| .sass-cache | |
| .env | |
| public/ |
This file contains hidden or 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
| FROM nginx | |
| MAINTAINER OKUMURA Takahiro <[email protected]> | |
| RUN apt-get -qq update && \ | |
| apt-get -qq -y install curl jq rsync ruby-compass python-pip && \ | |
| apt-get -qq clean && \ | |
| rm -rf /var/lib/apt/lists/ && \ | |
| pip install Pygments && \ | |
| curl -sL $(curl -s https://api.github.com/repos/spf13/hugo/releases/latest | jq -r '.assets[] | select(.name | contains("Linux-64bit")) | .browser_download_url') | tar xz -C /usr/local/src --strip=1 && \ | |
| mv /usr/local/src/hugo* /usr/local/bin/hugo | |
| COPY . /srv/blog | |
| WORKDIR /srv/blog | |
| RUN hugo && \ | |
| gzip -k9 public/sitemap.xml && \ | |
| rsync -a --delete public/ /usr/share/nginx/html | |
| COPY nginx.conf /etc/nginx/nginx.conf |
This file contains hidden or 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
| user nginx; | |
| worker_processes auto; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| use epoll; | |
| multi_accept on; | |
| } | |
| http { | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; | |
| autoindex off; | |
| server_tokens off; | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml; | |
| gzip_vary on; | |
| access_log off; | |
| server { | |
| listen 80 reuseport so_keepalive=on; | |
| server_name blog.hifumi.info; | |
| charset utf-8; | |
| root /usr/share/nginx/html; | |
| index index.html; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment