{"id":22245455,"url":"https://github.com/niiknow/moonship","last_synced_at":"2026-04-17T10:07:49.669Z","repository":{"id":83312711,"uuid":"96003976","full_name":"niiknow/moonship","owner":"niiknow","description":"openresty dynamic multi-tenant CMS","archived":false,"fork":false,"pushed_at":"2020-03-04T18:20:50.000Z","size":369,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-13T02:48:55.553Z","etag":null,"topics":["lua","moonscript","nginx","ngx","openresty"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/niiknow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-02T05:18:47.000Z","updated_at":"2022-05-07T21:25:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"97cacd83-d267-4559-9c0f-6c4216712052","html_url":"https://github.com/niiknow/moonship","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/niiknow/moonship","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niiknow%2Fmoonship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niiknow%2Fmoonship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niiknow%2Fmoonship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niiknow%2Fmoonship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niiknow","download_url":"https://codeload.github.com/niiknow/moonship/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niiknow%2Fmoonship/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31924410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T09:10:15.403Z","status":"ssl_error","status_checked_at":"2026-04-17T09:10:14.455Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["lua","moonscript","nginx","ngx","openresty"],"created_at":"2024-12-03T05:14:59.605Z","updated_at":"2026-04-17T10:07:49.659Z","avatar_url":"https://github.com/niiknow.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moonship\n\u003e openresty dynamic multi-tenant CMS\n\n# features\n1. Auto Letsencrypt SSL with [lua-resty-auto-ssl](https://github.com/GUI/lua-resty-auto-ssl)\n2. Content retrieval from the cloud\n\n# stragegy\n1. Browser hit server with some DNS that is CNAME to `tenant_name.yourserver.com`\n2. We resolve tenant_name `base` to https://{some_cdn_host}/tenant_name/public\n3. Template will be `{base}/templates/page.liquid` and `home (/)` page template will be `{base}/templates/index.liquid`\n4. Content will be `{base}/contents/{slug}.json` or `index.json` for home page content.\n5. Content can override with it's own template.\n6. Assets (javascript/images/etc) are stored in {base}/assets\n\n**Base on the stategy above**\n\n* Auto-ssl is approved by determining if CNAME is valid.  If Apex domain, then CNAME is lookup using `www` of the Apex domain.  Redirects are handled by rule definition under https://{s3}/tenant_name/private/web.json - if web.json exists, then website has been correctly setup/activated.  Example DNS `www.somesite.com CNAME yodawg.yourserver.com` identified that `yodawg` as your tenant name.\n\n* Redirect rules must follow the schema loosely defined here: https://github.com/niiknow/mooncrafts/blob/master/lib/mooncrafts/resty/router.moon#L8  This library was originally made to handle *FaaS*, as a result, redirect rules can contain raw code that are capable of handling HTTP request.\n\n**And we will need the following config**\n```\n# passthrough env vars\n# AWS S3 config\nenv LETSENCRYPT_URL;\nenv AWS_DEFAULT_REGION;\nenv AWS_S3_KEY_ID;\nenv AWS_S3_ACCESS_KEY;\nenv AWS_S3_PATH;\n\n# app stuff\nenv BASE_HOST; # the cname base host, i.e. yourserver.com\n```\n\n# build and run\nosx, install lua/luarocks:\n```\nbrew update\nbrew install lua\nbrew install openssl\nmake init\nmake test\n```\n\n# MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniiknow%2Fmoonship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniiknow%2Fmoonship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniiknow%2Fmoonship/lists"}