{"id":34529505,"url":"https://github.com/toshy/docker-cloudflare-vite-react-template","last_synced_at":"2026-05-26T21:01:20.483Z","repository":{"id":314778679,"uuid":"1056268124","full_name":"ToshY/docker-cloudflare-vite-react-template","owner":"ToshY","description":"Dockerised version of https://github.com/cloudflare/templates/tree/main/vite-react-template","archived":false,"fork":false,"pushed_at":"2026-01-18T16:53:31.000Z","size":590,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T17:48:04.027Z","etag":null,"topics":["cloudflare-workers","cloudflare-workers-docker","cloudflare-workers-template","cloudflare-workers-vite-react-template","cloudlfare-workers-docker-template","vite-react","vite-react-template"],"latest_commit_sha":null,"homepage":"","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/ToshY.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-13T18:19:26.000Z","updated_at":"2026-01-18T10:29:05.000Z","dependencies_parsed_at":"2025-09-14T19:28:32.970Z","dependency_job_id":"62abd827-aa38-442a-801f-30ed47048a1d","html_url":"https://github.com/ToshY/docker-cloudflare-vite-react-template","commit_stats":null,"previous_names":["toshy/docker-cloudflare-vite-react-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/ToshY/docker-cloudflare-vite-react-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshY%2Fdocker-cloudflare-vite-react-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshY%2Fdocker-cloudflare-vite-react-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshY%2Fdocker-cloudflare-vite-react-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshY%2Fdocker-cloudflare-vite-react-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ToshY","download_url":"https://codeload.github.com/ToshY/docker-cloudflare-vite-react-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshY%2Fdocker-cloudflare-vite-react-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33538660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cloudflare-workers","cloudflare-workers-docker","cloudflare-workers-template","cloudflare-workers-vite-react-template","cloudlfare-workers-docker-template","vite-react","vite-react-template"],"created_at":"2025-12-24T05:27:17.828Z","updated_at":"2026-05-26T21:01:20.471Z","avatar_url":"https://github.com/ToshY.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐋 Cloudflare React + Vite + Hono + Cloudflare Workers with Docker Compose\n\nThis is a development setup with docker compose for the [Vite React Template](https://github.com/cloudflare/templates/tree/main/vite-react-template).\n\n\u003e [!TIP]\n\u003e While this example shows the Vite React template, the principles on how to use Docker Compose can be applied for any other template as well.\n\n## 🛠️ Prerequisites\n\n* [Docker Compose](https://docs.docker.com/compose/install/)\n* [Task (optional)](https://taskfile.dev/installation/)\n\n## 📜 Usage\n\n### First time\n\n1. Copy `.env.dev.example` to `.env.dev`.\n\n\t```shell\n\ttask init\n\t```\n\n\u003e [!NOTE]\n\u003e - The `.env.dev` file is used for development purposes, and can include variables/secrets like `CLOUDFLARE_API_TOKEN`, and will **not** be parsed for wrangler types.\n\n2. Install dependencies before starting the container.\n\n\t```shell\n\ttask npm:install\n\t```\n\n3. Start the container.\n\n\t```shell\n\ttask up\n\t```\n\n4. Access the UI at [`http://localhost:8789`](http://localhost:8789).\n\n🚀 **TLDR**\n\nInitialize the project, install dependencies, and start the container.\n\n```shell\ntask setup\n```\n\n### 🐚 Additional commands\n\n#### NPM\n\n##### Install\n\nInstall NPM dependencies.\n\n```shell\ntask npm:install\n```\n\n##### Update\n\nUpdate NPM dependencies.\n\n```shell\ntask npm:update\n```\n\n#### Compose\n\n##### Up\n\nStart vite dev server.\n\n```shell\ntask up\n```\n\nBuild and start vite preview server.\n\n```shell\ntask up:preview\n```\n\n##### Down\n\nStop and remove the container.\n\n```shell\ntask down\n```\n\n##### Logs\n\nView container logs.\n\n```shell\ntask logs\n```\n\n#### Wrangler\n\n##### Types\n\nGenerate wrangler types.\n\n```shell\ntask wrangler:types\n```\n\n##### Deploy\n\nDeploy to Cloudflare Workers.\n\n```shell\ntask wrangler:deploy\n```\n\n\u003e [!IMPORTANT]  \n\u003e This requires the `CLOUDFLARE_API_TOKEN` to be set in the `.env` file.\n\n##### Secret\n\nUpload secret.\n\n```shell\ntask wrangler:secret s=\u003cNAME_OF_SECRET\u003e\n# Example\ntask wrangler:secret s=API_KEY\n```\n\n\u003e [!IMPORTANT]\n\u003e - This requires the `CLOUDFLARE_API_TOKEN` to be set in the `.env` file.\n\u003e - You will be prompted to enter the secret value.\n\n#### Biome\n\n##### Format\n\nRun biome format with safe fixes.\n\n```shell\ntask biome:format:fix\n```\n\n##### Lint\n\nRun biome lint with safe fixes.\n\n```shell\ntask biome:lint:fix\n```\n\n##### Check\n\nRun biome check with safe fixes.\n\n```shell\ntask biome:check:fix\n```\n\n## 🧑‍🏫 Good to know\n\n- The current development setup uses [Vite](https://vite.dev/) with the [`@cloudflare/vite-plugin`](https://www.npmjs.com/package/@cloudflare/vite-plugin).\n- The base image for the docker compose worker service is `node:24-slim`.\n- There is a Github action that releases a new version of the worker when pushed to `main` (or manual workflow dispatch).\n\t- The action uses `cloudflare/wrangler-action@v3` but has the `wranglerVersion` explicitly set to match the version in the `package.json` (v4).\n\t- By default, the [`release.yml`](.github/workflows/release.yml) has `WRANGLER_QUIET` set to `true` and `SHOW_DEPLOYMENT_URL` set to `false`, which will hide the deployment URL from the logs.\n\n## 🛠️ Contribute\n\n### Requirements\n\n* ☑️ [Pre-commit](https://pre-commit.com/#installation).\n* 📋 [Task (optional)](https://taskfile.dev/installation/)\n\n### Usage\n\nRun `pre-commit install` or `task precommit:install` to install the pre-commit hooks.\n\n## ❕ Licence\n\nThis repository comes with a [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshy%2Fdocker-cloudflare-vite-react-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoshy%2Fdocker-cloudflare-vite-react-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshy%2Fdocker-cloudflare-vite-react-template/lists"}