{"id":13651508,"url":"https://github.com/stacksfoundation/render-stacks","last_synced_at":"2025-04-22T22:31:20.871Z","repository":{"id":43218925,"uuid":"441245601","full_name":"stacksfoundation/render-stacks","owner":"stacksfoundation","description":"stacks blockchain on https://render.com","archived":false,"fork":false,"pushed_at":"2023-02-18T00:28:50.000Z","size":191,"stargazers_count":10,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-24T04:13:34.173Z","etag":null,"topics":["blockchain","blockstack","decentralized","stacks"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stacksfoundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-12-23T17:03:12.000Z","updated_at":"2024-01-24T04:13:34.173Z","dependencies_parsed_at":"2024-01-03T05:18:43.998Z","dependency_job_id":"8de5c5e3-63b3-4ffd-8f25-ede7a59270f6","html_url":"https://github.com/stacksfoundation/render-stacks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksfoundation%2Frender-stacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksfoundation%2Frender-stacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksfoundation%2Frender-stacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksfoundation%2Frender-stacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stacksfoundation","download_url":"https://codeload.github.com/stacksfoundation/render-stacks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333947,"owners_count":21413482,"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":["blockchain","blockstack","decentralized","stacks"],"created_at":"2024-08-02T02:00:50.140Z","updated_at":"2025-04-22T22:31:20.636Z","avatar_url":"https://github.com/stacksfoundation.png","language":"Dockerfile","funding_links":[],"categories":["App Development"],"sub_categories":["Indexing and Querying APIs"],"readme":"# Stacks Blockchain on Render\n\nThis repo makes it possible to spin up an instance of the [stacks-blockchain](https://github.com/blockstack/stacks-blockchain) and [stacks-blockchain-api](https://github.com/hirosystems/stacks-blockchain-api) on the hosted [render.com](https://render.com) service.\n\nTo get started, you should [register for a render account](https://dashboard.render.com/register) and get familiar with the [documentation for render](https://render.com/docs).\n\nOnce you've registered, hit this big blue button, and select the network mode you want from the branches drop down (mainnet, testnet, mocknet)\n\n\n[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/wileyj/render-stacks\u0026branch=master)\n\n### Important considerations \nOne thing to note is that with the free-tier plan, it's **possible** to run this with some modifications (mainly to the persistent disks and database), but it's **NOT recommended**\n\n\n## Components\n\nThis project is using render.com's infrastructure as code system, called blueprints. The blueprint is similar in nature to what you might see with a docker compose set up. Each service is a block of YAML. Read below to learn about each one.\n\n### stacks-blockchain\n\nThis is the stacks-blockchain container, built from the [officially released docker image](https://hub.docker.com/r/blockstack/stacks-blockchain/tags)\n\nSome additional components were added to make the startup work within render's platform (there is an nginx proxy in front of `stacks-blockchain`)\n\nNote that this instance is unreachable on the P2P port 20444 from external neighbors, but the HTTP endpoint will be available over port `80` once the port opens (on first sync, this can take a while).\n\nThis container is built from [stacks-blockchain.Dockerfile](./stacks-blockchain.Dockerfile) and uses runit to start the 2 services (nginx, stacks-blockchain), with the [service script](./unit-files/run/stacks-blockchain) performing a `sed` replacement for the `event-observer` config directive before starting the service. \n\nThe nginx service itself is a very [simple setup](./configs/nginx-stacks.conf) - `/status` returns a `200` for the render health check, and nginx proxies / to `localhost:20443` (it may take sometime before this port is open).\n\n---\n\n### stacks-blockchain-api\nThis is the stacks-blockchain API container, built from the [officially released docker image](https://hub.docker.com/r/hirosystems/stacks-blockchain-api/tags)\n\nAs with the `stacks-blockchain` container, some additional components were added to make the startup work within render's platform (there is an nginx proxy in front of stacks-blockchain-api)\n\nIn render, this means that the API's event-observer is running internally on port `3700`, and the HTTP interface is on `3999`, with an nginx proxy over port `80` to the HTTP endpoint (when it's available - dependent on `\u003cstacks-blockchain\u003e/v2/info` ). \n\nThe container that is built from [stacks-blockchain-api.Dockerfile](./stacks-blockchain-api.Dockerfile) uses runit to start the 2 services (nginx, stacks-blockchain-api).\n\nNginx itself is a very [simple setup](./configs/nginx-api.conf) - `/status` returns a `200` for the render health check, and nginx proxies / to `localhost:3999`. \n\n---\n\n### postgres\n\nUsing the [render.yaml](./render.yaml) file, this spins up a managed instance of postgres. Currently it's open to the world and the password is randomly generated. \n\nIP allowlist can be added to the `render.yaml` to restrict access further. \n\n---\n\n### nginx\n\nThe only publicly accessible service, this container acts as a proxy for the API (both /`extended/v1` and `/v2` endpoints)\n\nDuring startup, it's not uncommon to see this service take a while before the root domain is available. \n\nDuring this time, though, `/status` will respond with `200 OK` to satisfy the health checks for render. \n\nThe [default config](configs/nginx-default.conf) is generic and only exposes `/status` for the render healtcheck. The [entrypoint script](scripts/nginx.sh) is periodically checking the `\u003cstacks-blockchain-instance\u003e/extended/v1/status` endpoint for a `200` response. \\\nOnce the API is serving requests, an envsubst is run from the [entrypoint script](scripts/nginx.sh) on the [config](./configs/nginx.conf) and nginx is reloaded with the new config enabled. \n \n---\n\n## Deployment\nFork this repo and update [render.yaml](./render.yaml) to your liking, or use the big blue **Deploy to Render** button above\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksfoundation%2Frender-stacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstacksfoundation%2Frender-stacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksfoundation%2Frender-stacks/lists"}