Advanced Setup
The quick start setup is designed for quick evaluation and runs with defaults directly from the docker-compose.yml. For deeper evaluation, you can configure the stack using environment variables.
This page explains how to extend the setup with your own .env file and details the mandatory and optional variables you can use.
Creating an environment file
In the /advanced directory, create a file named .env:
touch .envDocker Compose will automatically load variables from this file and substitute them into the configuration.
If you would use a different name, you can later pass the correct .another-env to docker compose --env-file .another-env up -d.
Required environment variables
These variables must be set to ensure the services start securely and consistently.
Variable | Description |
|---|---|
DB_PASSWORD | PostgreSQL password |
INFLUXDB_ADMIN_PASSWORD | InfluxDB admin password |
GF_SECURITY_ADMIN_PASSWORD | Grafana admin password |
Alternatively, you can also pass these environment variables via the command line.
Optional environment variables
You can also define the optional variables to adapt the setup to your environment.
General
Variable | Default | Description |
|---|---|---|
TZ | UTC | Timezone for the Docker containers |
Factry Historian
Variable | Default | Description |
|---|---|---|
VERSION | latest | Factry Historian version to use |
AUTO_MIGRATE | true | Auto-perform migrations |
DB_NAME | factry_historian | PostgreSQL database name |
DB_USER_NAME | factry | PostgreSQL username |
GRPC_PORT | 8001 | gRPC port |
GRPC_BIND_ADDRESS | 0.0.0.0 | gRPC bind address |
REST_PORT | 8000 | REST API port |
REST_BIND_ADDRESS | 0.0.0.0 | REST API bind address |
Grafana
Variable | Default | Description |
|---|---|---|
GF_VERSION | latest | Grafana OSS version |
GF_SERVER_ROOT_URL | http://127.0.0.1 | Grafana root URL |
GRAFANA_PORT | 3000 | Grafana server port |
GF_AUTH_ANONYMOUS_ENABLED | false | Enable anonymous access |
GF_AUTH_ANONYMOUS_ORG_NAME | Factry | Organization for anonymous users |
GF_BIND_ADDRESS | 0.0.0.0 | Grafana bind address |
InfluxDB
Variable | Default | Description |
|---|---|---|
INFLUXDB_ADMIN_USER | factry | InfluxDB admin username |
Validating your configuration
Before starting the stack, run:
docker compose configThis will render the final configuration with your environment variables applied, making it easy to confirm credentials and port mappings.
Keep secrets safe! Avoid committing .env files with passwords into Git. Instead, use a secret management tool or keep a local .env excluded via .gitignore.