From 19c93853220810abd71e3c5ec0c013e065621ee1 Mon Sep 17 00:00:00 2001 From: Juan Sebastian Montoya Date: Thu, 26 Sep 2024 20:42:58 -0500 Subject: [PATCH] Update readme with image link --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0acc08c..28878c2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The following endpoints are available: - https://avatars.jusemon.com/random - https://avatars.jusemon.com/:seed -The size of the image and the style can be changed with the following query params: +The size and style of the image can be changed with the following query params: - `size`: any number between `16` and `512` - `style`: see the list endpoint, the valid values are defined by the property `key` @@ -34,6 +34,31 @@ To start the project run `npm run dev` or `yarn dev` For run it in docker just run `docker compose up` +Alternatively, you can run the image without cloning this repo using the image published [here](https://git.jusemon.com/jusemon/avatars-api/packages) + +With docker run: + +```sh +docker run -p 3000:3000 -e NODE_ENV=production -e HOST=0.0.0.0 -e PORT=3000 -e API_VERSION=1 -e ALLOWED_ORIGINS=https://example.com git.jusemon.com/jusemon/avatars-api:1.0.0 +``` + +With docker compose: + +```yaml +name: avatars +services: + api: + image: git.jusemon.com/jusemon/avatars-api:1.0.0 + ports: + - 3000:3000 + environment: + NODE_ENV: "production" + HOST: "0.0.0.0" + PORT: 3000 + API_VERSION: 1 + ALLOWED_ORIGINS: "https://example.com" +``` + ## Libraries Used - DiceBear (for avatar generation)