{"id":20821990,"url":"https://github.com/internetarchive/coderunr","last_synced_at":"2025-06-18T20:38:19.846Z","repository":{"id":66163172,"uuid":"577445387","full_name":"internetarchive/coderunr","owner":"internetarchive","description":"deploy saved changes to website unique hostnames instantly -- can skip commits, pushes \u0026 full CI/CD","archived":false,"fork":false,"pushed_at":"2025-03-21T06:33:19.000Z","size":125,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-31T11:51:12.429Z","etag":null,"topics":["cicd","deployment","preview-apps","websites"],"latest_commit_sha":null,"homepage":"https://internetarchive.github.io/coderunr","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/internetarchive.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":"2022-12-12T18:53:41.000Z","updated_at":"2025-03-21T06:33:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"207b88b0-8ba5-4266-b5be-0233f30c6696","html_url":"https://github.com/internetarchive/coderunr","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/internetarchive%2Fcoderunr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Fcoderunr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Fcoderunr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Fcoderunr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/internetarchive","download_url":"https://codeload.github.com/internetarchive/coderunr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252913985,"owners_count":21824291,"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":["cicd","deployment","preview-apps","websites"],"created_at":"2024-11-17T22:13:39.957Z","updated_at":"2025-05-07T16:25:11.696Z","avatar_url":"https://github.com/internetarchive.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coderunr - website edits live in seconds\n\n# ₀₀₀₁₀₁  ᕕ( ᐛ )ᕗ\n\n## Deploy saved changes to websites -- _without_ commits, pushes \u0026 full CI/CD\n\nAn opensource project from Internet Archive \u0026 tracey.\n\n[Source code](https://github.com/internetarchive/coderunr)\n\n(work in progress)\n\n\n## From editor save to live website in seconds\n- Setup VSCode (or similar) to run a command on every file save.\n  - Install `CodeRunr` extension:\n    - https://marketplace.visualstudio.com/items?itemName=InternetArchive.coderunr-vscode\n    - [source code](https://github.com/internetarchive/coderunr-vscode)\n  - This will sync your saved file to your CodeRunr Server\n    - It will auto-detect your checked out branch, git clone url, and do various setup, so that you'll get a unique https:// url (with automatic https certs) for each branch.\n- Configure VSCode Settings:\n  - Change `example.com` to your `ssh`-able CodeRunr Server (see below).\n```json\n// Change `example.com` to your `ssh`-able CodeRunr Server.\n\"CodeRunr.server\": \"example.com\",\n\"CodeRunr.match\": \"dev/|petabox\",\n```\n\n### Prerequisites - CodeRunr Server\n- An admin needs to do a one-time setup of a DNS wildcard to point to a Virtual Machine that you can `ssh` into.\n  - This will be your CodeRunr Server.\n  - The CodeRunr Server needs to have `docker` and `git` packages installed.\n- The admin runs our container below, but:\n  - changes `code.archive.org` to whatever your DNS wildcard domain is.\n  - changes `registry.archive.org` to whatever default docker container registry to use, if needed (repos using github.com/gitlab.com will get autodetected).  This is optional -- you can set it to blank `\"\"` empty string.\n```sh\ndocker run -d --net=host --privileged -v /var/run/docker.sock:/var/run/docker.sock --pull=always \\\n  -e DOMAIN_WILDCARD=code.archive.org \\\n  -e REGISTRY_FALLBACK=registry.archive.org \\\n  -v /coderunr:/coderunr --restart=always --name coderunr -d ghcr.io/internetarchive/coderunr:main\n```\n\n\n## Notes\n- One docker container per repo, for trigger-based build \u0026 incremental build steps\n- Option for repo to self-multiplex hostnames =\u003e docroots (eg: petabox)\n  - this allows for a full custom nginx and/or php webserver stack, etc.\n\n### Progress notes\n- Off to a promising start -- basic concept working for static file server with build step and triggered re-build steps\n- harder case php fastcgi dual LB/caddy layer idea manual testing seems workable\n- user needs to `docker login` (on server running the `[coderunr]` docker image) to any registry they can normally `docker pull` private images from\n- if your docker containers are having trouble talking to outside work, check `/etc/default/docker` and try something like `DOCKER_OPTS=\"--dns 8.8.8.8 --dns 8.8.4.4\"` (google public DNS) in case that helps\n\n\n### Quirks notes\n- As of now, the CodeRunr Server needs `yq`.  You can get like this (check https://github.com/mikefarah/yq/releases/latest for alternate OS/ARC if not linux amd64):\n```sh\nsudo wget -O  /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.30.8/yq_linux_amd64\nsudo chmod +x /usr/local/bin/yq\n- petabox repo needs 8010 UDP ferm port opened.\n```\n\n\n\n## TODO\n- xxx note: httpd.js no dir listings, but *does* serve DOTFILES\n- xxx \"clone\" self locally *first* so repo YML overrides in our dir get used\n- xxx make admin script(s) to restart all projects (remove dir, docker stop \u0026 rm -v ..) \u0026 coderunr\n- xxx offshoot triggers\n- xxx document repo docroot multiplexing setups\n- xxx offshoot multistage build w/ rendertron makes nav...\n- xxx document repo-based YAML overrides\n- xxx webhooks\n  - GL per group\n  - GH per organization\n\n## Future R\u0026D - Work in Progress\n```bash\n\n# xxx `nom-ssh` variant that `cd` you to proper branch, once inside container, eg:\nnomad alloc exec -i -t -task www-av a208c683 zsh -c 'cd /coderunr/main; zsh'\n\n# nom-ssh  (use group-project + branch)\nssh -t -A code 'docker exec -it ia-petabox bash -c \"cd /coderunr/master; bash\"'\n\n# nom-logs (use group-project)\nssh -t -A code docker logs -f ia-petabox\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternetarchive%2Fcoderunr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finternetarchive%2Fcoderunr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternetarchive%2Fcoderunr/lists"}