Installation Guide - Docker
Analytics API: This service is an API that extracts data from the analytics database.
Prerequisites
- Installation of Analytics Data Processing (v2.0.0 or greater)
Configuration options
The service should be configured with the following environment variables when the container is started:
| Setting Name | Description | default value |
|---|---|---|
| AUTHENTICATION__API_KEY | The API key set by the user during setup | (empty) |
| AUTHENTICATION__API_KEY_HEADER | Header name containing the API key | (empty) |
| DATABASE__TYPE | Type of database (use mssql) | (empty) |
| DATABASE__USERNAME | Username for database | (empty) |
| DATABASE__PASSWORD | Password for database | (empty) |
| DATABASE__HOST | Host for database | (empty) |
| DATABASE__PORT | Port for database | (empty) |
| DATABASE__NAME | Name of database | (empty) |
| DATABASE__TRUST_SERVER_CERTIFICATE | Trust server certificate option yes or no | yes |
| DATABASE__ENCRYPT | Encryption option yes or no | yes |
Running the container
Use the following command to run the Analytics API container with the required configuration:
docker run -d \
--name analytics-api \
-p 9091:9091 \
-e AUTHENTICATION__API_KEY="your-secret-api-key" \
-e AUTHENTICATION__API_KEY_HEADER="X-API-Key" \
-e DATABASE__TYPE="mssql" \
-e DATABASE__USERNAME="your-db-username" \
-e DATABASE__PASSWORD="your-db-password" \
-e DATABASE__HOST="your-db-host" \
-e DATABASE__PORT="1433" \
-e DATABASE__NAME="analytics" \
-e DATABASE__TRUST_SERVER_CERTIFICATE="yes" \
-e DATABASE__ENCRYPT="yes" \
<image-name>:<tag>
Replace the placeholder values with your actual configuration details.