Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Astro] General cleanup #31

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -6,13 +6,13 @@

<Layout title="Containerflare">
<main>
<h1><span class="text-gradient">Containerflare</span></h1>

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

View workflow job for this annotation

GitHub Actions / ESLint

Classname 'text-gradient' is not a Tailwind CSS class!
<h2 class="text-gradient">

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

View workflow job for this annotation

GitHub Actions / ESLint

Classname 'text-gradient' is not a Tailwind CSS class!
The Globally Distributed, Edge Container Registry
</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
Loading