README.md in stan-0.2.4 vs README.md in stan-0.3.0

- old
+ new

@@ -1,7 +1,16 @@ -# Stan +<img src=stan-logo.png width=50% /> +* [Installation](#installation) +* [Usage](#usage) + + [Server](#server) + - [Example Nginx configuration](#example-nginx-configuration) + + [Client](#client) +* [Development](#development) +* [Contributing](#contributing) +* [License](#license) + Stan is a little tool that helps you to deploy static sites to a centralized host. ## Installation Install Stan with @@ -29,13 +38,50 @@ * `STAN_UPLOAD_DIR=/tmp/stan/upload` is the directory where Stan will temporarly store sites before deploying them. * `STAN_PUBLIC_DIR=/srv/stan` is the directory where the final site will be deployed. * `STAN_BIND=127.0.0.1` is the ip to bind to. * `STAN_PORT=4567` is the port to use. -Please note that Stan will create a public directory and a directory for each deployed site within that folder. -The final site will then be deployed to `/srv/stan/public/my-site` for example. +Please note that Stan will create a directory for each deployed site within that folder. +The final site will then be deployed to `/srv/stan/my-site` for example. +#### Example Nginx configuration + +``` +upstream pages { + server localhost:4567 fail_timeout=0; +} + +server { + listen 443; + listen [::]:443; + + # replace with server name config and ssl settings + + client_max_body_size 100m; + + location / { + root /srv/stan; + } + + location /upload { + proxy_read_timeout 300; + proxy_connect_timeout 300; + proxy_redirect off; + + proxy_http_version 1.1; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + + proxy_pass http://pages/upload; + } +} + +``` + ### Client * `STAN_SERVER=pages.example.com` is the URL of the remote Stan server which must expose the `/upload` route. Define ports like usual. * `STAN_TEMP_DIR=/tmp/stan` is the directory where Stan will store the site after compressing it. The archive will be removed after upload. @@ -52,5 +98,7 @@ ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). + +Look at the awesome logo I made at: <a href='https://onlinelogomaker.com' title='Online Logo Maker'>onlinelogomaker.com</a>