Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/desteves/pulumi-cloudflare-workers-ai

Cloudflare Workers AI app that displays a random quote and a text-to-image AI background. Deployed with Pulumi.
https://github.com/desteves/pulumi-cloudflare-workers-ai

ai cloudflare-workers iac pulumi-typescript

Last synced: 9 days ago
JSON representation

Cloudflare Workers AI app that displays a random quote and a text-to-image AI background. Deployed with Pulumi.

Awesome Lists containing this project

README

        

# Cloudflare Workers AI deployed with Pulumi

The app displays a random quote and a text-to-image AI background representative of such.

![Screenshot](./docs/images/hero.png)

## Overview

- [App Dev code -- Single Worker](./app/)
- [App Prod code -- Multiple Workers](./app=prod/)
- [Infra Test+Prod code](./infra/)

## Pre-reqs

- npm
- Pulumi CLI
- Wrangler
- Pulumi Cloud account
- Cloudflare account with a Zone configured.

### Local development (Wrangler)

- Use the Wrangler CLI to test the Worker

### Testing (Pulumi)

- Using the `test` Pulumi stack to incrementally add the Cloudflare Resources.
- Uses a sample size for the data
- Adds a `DEMO` flag to the Cloudflare resources
- Triggered manually via `pulumi up` commands
- Stores all secrets + config in Pulumi ESC
- Running under [`quote-demo.atxyall.com`](https://quote-demo.atxyall.com/)

### Production (GitHub Actions + Pulumi)

- Uses GitHub Actions
- preview prod on GitHub commit to a PR against main
- update prod on GitHub merge to the main branch
- Uses GitHub OIDC to auth against Pulumi Cloud
- Uses the full prod size data, 2400+ CSV Entries
- Running under [`quote.atxyall.com`](https://quote.atxyall.com/)