{"id":15517359,"url":"https://github.com/flipez/stan","last_synced_at":"2025-03-28T19:48:04.015Z","repository":{"id":59156335,"uuid":"98454628","full_name":"Flipez/stan","owner":"Flipez","description":"Deploy your static sites easy with Stan","archived":false,"fork":false,"pushed_at":"2018-11-19T17:21:27.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T09:05:51.080Z","etag":null,"topics":["deployment","easy-to-use","ruby","sinatra","static-site"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flipez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-26T18:39:50.000Z","updated_at":"2018-11-19T17:21:28.000Z","dependencies_parsed_at":"2022-09-13T20:10:20.404Z","dependency_job_id":null,"html_url":"https://github.com/Flipez/stan","commit_stats":null,"previous_names":["flipez/static-stan"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fstan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fstan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fstan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flipez%2Fstan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flipez","download_url":"https://codeload.github.com/Flipez/stan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093105,"owners_count":20722395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","easy-to-use","ruby","sinatra","static-site"],"created_at":"2024-10-02T10:12:54.154Z","updated_at":"2025-03-28T19:48:03.986Z","avatar_url":"https://github.com/Flipez.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=stan-logo.png width=50% /\u003e\r\n\r\n* [Installation](#installation)\r\n* [Usage](#usage)\r\n  + [Server](#server)\r\n    - [Example Nginx configuration](#example-nginx-configuration)\r\n  + [Client](#client)\r\n* [Development](#development)\r\n* [Contributing](#contributing)\r\n* [License](#license)\r\n\r\nStan is a little tool that helps you to deploy static sites to a centralized host.\r\n\r\n## Installation\r\nInstall Stan with\r\n\r\n    $ gem install stan\r\n\r\nIn order to build the dependencies please make sure you installed the ruby headers.\r\n\r\n    $ apt install ruby-dev\r\n\r\n## Usage\r\n\r\n```\r\nCommands:\r\n  stan compress DIRECTORY     # compress given directory\r\n  stan deploy DIRECTORY NAME  # deploys given directory to stan server\r\n  stan help [COMMAND]         # Describe available commands or one specific command\r\n  stan server                 # start the server to receive and serve pages\r\n  stan version                # display the stan version\r\n```\r\n\r\nThere are a few variables you have to set:\r\n\r\n### Server\r\n\r\n* `STAN_UPLOAD_DIR=/tmp/stan/upload` is the directory where Stan will temporarly store sites before deploying them.\r\n* `STAN_PUBLIC_DIR=/srv/stan` is the directory where the final site will be deployed.\r\n* `STAN_BIND=127.0.0.1` is the ip to bind to.\r\n* `STAN_PORT=4567` is the port to use.\r\n\r\nPlease note that Stan will create a directory for each deployed site within that folder.\r\nThe final site will then be deployed to `/srv/stan/my-site` for example.\r\n\r\n#### Example Nginx configuration\r\n\r\n```\r\nupstream pages {\r\n  server localhost:4567 fail_timeout=0;\r\n}\r\n\r\nserver {\r\n  listen 443;\r\n  listen [::]:443;\r\n\r\n  # replace with server name config and ssl settings\r\n\r\n  client_max_body_size 100m;\r\n\r\n  location / {\r\n    root /srv/stan;\r\n  }\r\n\r\n  location /upload {\r\n    proxy_read_timeout      300;\r\n    proxy_connect_timeout   300;\r\n    proxy_redirect          off;\r\n\r\n    proxy_http_version 1.1;\r\n\r\n    proxy_set_header    Host                $host;\r\n    proxy_set_header    X-Real-IP           $remote_addr;\r\n    proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;\r\n    proxy_set_header    X-Forwarded-Proto   https;\r\n\r\n    proxy_pass http://pages/upload;\r\n  }\r\n}\r\n\r\n```\r\n\r\n### Client\r\n\r\n* `STAN_SERVER=pages.example.com` is the URL of the remote Stan server which must expose the `/upload` route. Define ports like usual.\r\n* `STAN_TEMP_DIR=/tmp/stan` is the directory where Stan will store the site after compressing it. The archive will be removed after upload.\r\n\r\n\r\n## Development\r\n\r\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\r\n\r\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\r\n\r\n## Contributing\r\n\r\nBug reports and pull requests are welcome on GitHub at https://github.com/Flipez/static-stan.\r\n\r\n\r\n## License\r\n\r\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\r\n\r\nLook at the awesome logo I made at: \u003ca href='https://onlinelogomaker.com' title='Online Logo Maker'\u003eonlinelogomaker.com\u003c/a\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipez%2Fstan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipez%2Fstan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipez%2Fstan/lists"}