Skip to content

Commit

Permalink
Add docker configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alisinabh committed May 7, 2024
1 parent 793739c commit 85c82cf
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@ To run Atlas, you can choose one of the methods below.

### Using Docker (Recommended)

[TODO: Add docker instruction]
We automatically build docker images of Atlas and push them to [docker hub](https://hub.docker.com/r/alisinabh/atlas).

You can easily run our docker image which automatically downloads the latest MaxMind DB like this.

```
docker run -it --rm \
-e "MAXMIND_ACCOUNT_ID={account id here}" \
-e "MAXMIND_LICENSE_KEY={license_key_here}" \
-p 8080:8080 \
alisinabh/atlas
```

Same image can be used for deploying Atlas to Kubernetes or other orchestration platforms.

For more configuration variables, visit [Configuration](#configuration) section.

### Compiling from source

Expand All @@ -40,16 +54,16 @@ otherwise atlas crashes on startup.
Atlas uses OS environment variables for configuration. Here are the list of environment variables
that atlas looks into.

- MAXMIND_ACCOUNT_ID: Your Maxmind Account ID used to download the database. **Required**
- MAXMIND_LICENSE_KEY: Your Maxmind license key used to download the database. **Required**
- MAXMIND_DB_VARIANT: (Also called Edition ID) The database edition to used. Default is `GeoLite2-City`.
- MAXMIND_DB_DOWNLOAD_URL: Database download URL (only change if your download URL differs). Default is `https://download.maxmind.com/geoip/databases/{VARIANT}/download?suffix=tar.gz`.
- `MAXMIND_ACCOUNT_ID`: Your Maxmind Account ID used to download the database. **Required**
- `MAXMIND_LICENSE_KEY`: Your Maxmind license key used to download the database. **Required**
- `MAXMIND_DB_VARIANT`: (Also called Edition ID) The database edition to used. Default is `GeoLite2-City`.
- `MAXMIND_DB_DOWNLOAD_URL`: Database download URL (only change if your download URL differs). Default is `https://download.maxmind.com/geoip/databases/{VARIANT}/download?suffix=tar.gz`.

- DB_PATH: Default path to save databases in. Default is `/opt/atlas/db`.
- DB_UPDATE_INTERVAL_SECONDS: How often to check for updates in seconds. Default is a day (86400s).
- HOST: Host to serve Atlas API on. Default is `0.0.0.0`.
- PORT: Port number to serve Atlas API on. Default is `8080`.
- SWAGGER_UI_ENABLED: If set to `true` swagger UI will be served on `http://{HOST}:{PORT}/swagger-ui` endpoint. Default is `false`.
- `DB_PATH`: Default path to save databases in. Default is `/opt/atlas/db`.
- `DB_UPDATE_INTERVAL_SECONDS`: How often to check for updates in seconds. Default is a day (86400s).
- `HOST`: Host to serve Atlas API on. Default is `0.0.0.0`.
- `PORT`: Port number to serve Atlas API on. Default is `8080`.
- `SWAGGER_UI_ENABLED`: If set to `true` swagger UI will be served on `http://{HOST}:{PORT}/swagger-ui` endpoint. Default is `false`.

## Contribution

Expand Down

0 comments on commit 85c82cf

Please sign in to comment.