Skip to content

Commit

Permalink
[Astro] General cleanup (#31)
Browse files Browse the repository at this point in the history
* [Astro] General cleanup

* [Index] Update index to `docker run`

* [Docs] Improve README with development instructions
  • Loading branch information
MNThomson committed Feb 12, 2024
1 parent 59f26c7 commit 261ce4d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,51 @@

## About

`containerflare` is currently in early Alpha. Branch `master` is not guaranteed to be stable and breaking changes may be introduced without notice.
A globally distributed, edge container image registry that leverages the power of Cloudflare's global network. Providing `docker pull`'s 3x faster than DockerHub, Containerflare offers a unique solution for developers looking to distribute their container images worldwide efficiently.

## Features

- **Global Distribution**: Utilize Cloudflare's vast network to pull container images from the edge, closest to where they are needed
- **High Performance**: Experience speeds up to 3x faster than DockerHub, reducing the time it takes to download and deploy container images
- **Built with Astro**: Containerflare is developed using the Astro web framework, ensuring a modern and efficient web application
- **Cloudflare Pages Hosting**: By being hosted on Cloudflare Pages, Containerflare benefits from the additional speed and reliability inherent to the platform

## Demo

Use the publicly hosted instance at [cfcr.dev](https://cfcr.dev):

```console
docker pull cfcr.dev/hello-world
```

## Development

Containerflare can be run locally for either further development or customization.

> [!NOTE]
> **BEFORE** you run the following steps make sure:
> - You have Node installed locally on you machine
> - You have `docker` & `docker-compose` installed and running
```shell
# Clone the repository
git clone https://github.com/MNThomson/containerflare.git && cd containerflare

# To start developing, run containerflare
npm start
```

The development environment is now running and accesible at https://localhost:4321/

To benchmark the implementation:

```shell
# Build the empty container (so there is no docker cache effecting results)
cd dev && make build

# Run the empty container
make run

# Within the container shell run the command to pull from the locally running containerflare instance
pull
```
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const prerender = true;
</h2>
<p class="instructions">

Check warning on line 13 in src/pages/index.astro

View workflow job for this annotation

GitHub Actions / ESLint

Classname 'instructions' is not a Tailwind CSS class!
Containerflare is <strong>3x</strong> faster than DockerHub!<br />
<code>docker pull cfcr.dev/hello-world</code>
<code>docker run cfcr.dev/hello-world</code>
</p>
</main>
</Layout>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/v2/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ async function seedBlob(env: Env, hash: string) {
}

export const GET: APIRoute = async (context) => {
if (!import.meta.env.DEV) {
return new Response("", { status: 404 });
}
// if (!import.meta.env.DEV) {
// return new Response("", { status: 404 });
// }

console.log("Seeding...");
authHeader = await getAuth();
Expand Down

0 comments on commit 261ce4d

Please sign in to comment.