From 4d0f32f640e8d77078d3d20f8dca85fa74daed34 Mon Sep 17 00:00:00 2001 From: nzambello Date: Fri, 7 Jul 2023 08:28:25 +0200 Subject: [PATCH] update readme --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d544043..e961e0a 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,18 @@ Runs on Node and uses [Hono](https://hono.dev). Can be adapted to run on Bun, Cloudflare Workers, or any other serverless platform. Available as a [Docker image](https://hub.docker.com/r/nzambello/redirector). +Repository: [nzambello/redirector](https://git.nzambello.dev/nzambello/redirector). ## Usage -``` +```sh yarn install REDIRECT_URL=https://nzambello.dev PERMANENT=true yarn start ``` Then, open http://localhost:7878/ in your browser. -``` +```sh open http://localhost:7878 ``` @@ -29,13 +30,13 @@ It loads configuration from environment variables: - `REDIRECT_URL`: (**required**) the url to redirect to - `PERMANENT`: if true, it will return a 301 status code, otherwise 302 -## Docker example +### Docker example -``` +```sh docker run -p 7878:7878 -e REDIRECT_URL=https://nzambello.dev -e PERMANENT=true nzambello/redirector:latest ``` -## Docker compose example +### Docker compose example ```yaml version: "3.8" @@ -49,3 +50,11 @@ services: ports: - 7878:7878 ``` + +## Development + +To update the Docker image: + +```sh +docker buildx build --platform linux/amd64,linux/arm64 -t nzambello/redirector:latest --push . +```