From 3e83d51854c5392fd9f4d6a138168d4e390958a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sun, 8 Nov 2026 12:03:05 +0100 Subject: [PATCH] chore: move hosting from Vercel to Cloudflare Pages Replace vercel.json with Cloudflare Pages _redirects/_headers and a wrangler.toml, and document the Pages build settings. Co-Authored-By: Claude Opus 5.5 --- README.md | 12 +++++++++++- _headers | 5 +++++ _redirects | 1 + vercel.json | 28 ---------------------------- wrangler.toml | 5 +++++ 5 files changed, 22 insertions(+), 29 deletions(-) create mode 100644 _headers create mode 100644 _redirects delete mode 100644 vercel.json create mode 100644 wrangler.toml diff --git a/README.md b/README.md index 5c2385f..b1d19f8 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,19 @@ This repository contains Poetry's official installation script, installer source and related hosting configuration. -The script is hosted on [Vercel](https://vercel.com/) and made available at +The script is hosted on [Cloudflare Pages](https://pages.cloudflare.com/) and made available at https://install.python-poetry.org/. +### Hosting + +The Cloudflare Pages project is connected to this repository and configured with: + +- **Build command:** `mkdir -p dist && cp install-poetry.py _headers _redirects dist/` +- **Build output directory:** `dist` (set in `wrangler.toml`) + +`_redirects` serves `install-poetry.py` at `/`, and `_headers` makes sure it is +served as `text/plain`. + ## Usage Poetry provides a custom installer that will install `poetry` isolated diff --git a/_headers b/_headers new file mode 100644 index 0000000..45d44c3 --- /dev/null +++ b/_headers @@ -0,0 +1,5 @@ +/ + Content-Type: text/plain; charset=utf-8 + +/install-poetry.py + Content-Type: text/plain; charset=utf-8 diff --git a/_redirects b/_redirects new file mode 100644 index 0000000..7c61697 --- /dev/null +++ b/_redirects @@ -0,0 +1 @@ +/ /install-poetry.py 200 diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 2f069a7..0000000 --- a/vercel.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "headers": [ - { - "headers": [ - { - "key": "Content-Type", - "value": "text/plain; charset=utf-8" - } - ], - "source": "/" - }, - { - "headers": [ - { - "key": "Content-Type", - "value": "text/plain; charset=utf-8" - } - ], - "source": "/(.+)\\.py" - } - ], - "rewrites": [ - { - "destination": "/install-poetry.py", - "source": "/" - } - ] -} diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 0000000..66acb82 --- /dev/null +++ b/wrangler.toml @@ -0,0 +1,5 @@ +# Cloudflare Pages configuration. +# Build command (set in the Cloudflare dashboard): see README.md#hosting +name = "install-python-poetry-org" +compatibility_date = "2026-11-01" +pages_build_output_dir = "dist"