Workerist is a Cloudflare Worker designed to serve as a private Composer repository, utilizing Cloudflare's R2 storage for package distribution and Cloudflare Workers KV for authentication. This solution allows you to securely distribute PHP packages across your projects without setting up a dedicated package repository server.
- Cloudflare account with access to Workers and R2 storage
wrangler
CLI installed (refer to the Wrangler documentation)- Node.js and npm
- Clone the repository:
git clone https://github.com/alpipego/workerist.git
- Navigate to the project directory:
cd workerist
- Install dependencies:
npm install
- Configuration:
Copy the wrangler.toml.example
file to wrangler.toml
:
cp wrangler.toml.example wrangler.toml
Edit wrangler.toml
and add the kv_namespace
ID and the R2 bucket name to the appropriate fields.
Deploy the worker using the wrangler
CLI:
wrangler deploy
Configure your Composer projects to use this worker as a private repository. For detailed instructions on the setup and use, please refer to our in-depth blog post.
Contributions are welcome! Please feel free to submit pull requests or open issues to discuss potential improvements or features.
This project is open-sourced under the MIT License - see the LICENSE file for details.
- For a comprehensive guide on setting up and using this worker, please refer to our detailed blog post.
- Check out the Cloudflare Workers Documentation for more information on developing workers.
- Learn more about Cloudflare's R2 Storage and Workers KV.