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)