Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Mar 27, 2021
1 parent 5c014f9 commit b7100c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -22,19 +22,19 @@ It should be configured using env variables.

Please check [.env.example](./.env.example) for available variables and explanation.

`APP_DB_DSN` is always required and is string of the following form:
`DATABASE_URL` is always required and is string of the following form:

```
APP_DB_DSN=host=<str> port=<int> dbname=<str> user=<str> password=<pwd>
DATABASE_URL=postgres://user:pass@host:port/dbname
```

When running *urlsh* with docker-compose, the **preferred** way, `APP_DB_DSN` is
When running *urlsh* with docker-compose, the **preferred** way, `DATABASE_URL` is
automatically set from [`POSTGRES_*`](https://hub.docker.com/_/postgres) variables.

> Please note that `urlsh` does not ship with `.env` loader so to run it in bare metal,
one needs to use `export KEY=VALUE` or `source .env` manually.

If `APP_CACHE_HOST` is provided with redis host:port, then it will cache popular urls,
If `REDIS_URL` is provided with `redis://host:port`, then it will cache popular urls,
the popularity threshold is hard coded to minimal value in `common.constant`.
The cache will sync when short url is deleted and sometimes when expired.
The hit counters will however sync in realtime.
Expand Down

0 comments on commit b7100c3

Please sign in to comment.