{"id":24617740,"url":"https://github.com/jacoblincool/selflare","last_synced_at":"2025-05-07T05:25:07.372Z","repository":{"id":225638241,"uuid":"766465690","full_name":"JacobLinCool/selflare","owner":"JacobLinCool","description":"Compile Cloudflare Workers to Cap'n Proto and deliver them as minimalist Docker images.","archived":false,"fork":false,"pushed_at":"2025-05-06T04:16:40.000Z","size":174,"stargazers_count":28,"open_issues_count":11,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T05:24:35.717Z","etag":null,"topics":["capnproto","cloudflare-workers","docker"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/selflare","language":"TypeScript","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/JacobLinCool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2024-03-03T10:51:32.000Z","updated_at":"2025-04-11T07:00:36.000Z","dependencies_parsed_at":"2025-04-19T20:29:44.847Z","dependency_job_id":null,"html_url":"https://github.com/JacobLinCool/selflare","commit_stats":null,"previous_names":["jacoblincool/selflare"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fselflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fselflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fselflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fselflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/selflare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252627810,"owners_count":21778873,"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":["capnproto","cloudflare-workers","docker"],"created_at":"2025-01-24T23:40:23.296Z","updated_at":"2025-05-07T05:25:07.341Z","avatar_url":"https://github.com/JacobLinCool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selflare\n\nCompile Cloudflare Workers to Cap'n Proto and deliver them as minimalist Docker images.\n\n## Features\n\n-   [x] Cloudflare Worker\n-   [x] Cloudflare KV\n-   [x] Cloudflare D1\n-   [x] Cloudflare R2\n-   [x] Cloudflare DO\n-   [x] Cache API\n-   [ ] Cloudflare Vectorize\n-   [x] Environment Variables\n\n## Usage\n\nInstall the CLI with `npm i -g selflare` and run the following commands in the directory of your worker:\n\n```bash\nselflare compile   # Compile the worker to Cap'n Proto\nselflare docker    # Generate Dockerfile and docker-compose.yml\ndocker compose up  # Run the worker\n```\n\n## Environment Variables\n\nAll the environment variables defined in `[vars]` section of the `wrangler.toml` file will be replaced by the corresponding environment variables in the Docker container.\n\nYou can simply set the environment variables in the `docker-compose.yml` file like this:\n\n```yaml\nversion: \"3.8\"\n\nservices:\n    worker:\n        build: .\n        image: worker\n        volumes:\n            - ./.storage/cache:/worker/cache\n            - ./.storage/kv:/worker/kv\n            - ./.storage/d1:/worker/d1\n            - ./.storage/r2:/worker/r2\n        ports:\n            - \"8080:8080\"\n        environment:\n            - SOME_TOKEN=I_AM_A_TOKEN\n```\n\nThe image is based on [`jacoblincool/workerd`](https://github.com/JacobLinCool/workerd-docker) which has a size of 35MB (compressed) and supports both `amd64` and `arm64` architectures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fselflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblincool%2Fselflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fselflare/lists"}