Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions docs/install/olake-ui/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,73 @@ x-app-defaults:

This will create and use `/custom/path/to/olake-data` instead of the default `./olake-data` directory.

### External PostgreSQL Configuration

OLake supports using an **external PostgreSQL instance** instead of the built-in Postgres service included in the docker-compose file. PostgreSQL stores all job data, configurations, sync state, and Temporal workflow data.

**Configure `docker-compose.yml`**

The compose file can be downloaded from the OLake UI repository:
```bash
curl -o docker-compose.yml https://raw.githubusercontent.com/datazip-inc/olake-ui/refs/heads/master/docker-compose.yml
```

Within the compose file, an extension field named `x-db-envs` defines all database configuration values used by OLake and Temporal:

```yaml
x-db-envs:
DB_HOST: &DBHost postgresql
DB_PORT: &DBPort 5432
DB_USER: &DBUser temporal
DB_PASSWORD: &DBPassword temporal
DB_SSLMODE: &DBSSLMode disable
OLAKE_DB_NAME: &olakeDBName postgres
TEMPORAL_DB_NAME: &temporalDBName temporal
```

These values use YAML anchors `(&name)`, enabling reuse across multiple services.
To connect to an external PostgreSQL instance, the values in this section can be updated accordingly. All dependent services (olake-ui, temporal-worker, and temporal) will automatically read and use the updated configuration.

**TLS settings for external Temporal database**

The compose file includes optional TLS-related variables for Temporal's SQL connection:

```yaml
# SQL_TLS: true
# SQL_TLS_DISABLE_HOST_VERIFICATION: true
# SQL_TLS_ENABLED: true
# SQL_HOST_VERIFICATION: false
```

These values remain commented by default because the built-in PostgreSQL container does not require TLS.
When Temporal is configured to use an external PostgreSQL instance particularly one with SSL/TLS enabled, these variables can be uncommented and configured as needed.

**Separate database for Temporal**

Temporal can also be configured to use a dedicated PostgreSQL database, separate from the database used for storing OLake metadata and job-related information. This configuration is achieved by overriding the Temporal-specific environment variables in the service definition:

```yaml
temporal:
environment:
DB: postgres12
POSTGRES_SEEDS: <DATABASE_HOST_NAME>
DB_PORT: <DATABASE_PORT>
POSTGRES_USER: <DATABASE_USER>
POSTGRES_PWD: <DATABASE_PASSWORD>
DBNAME: <TEMPORAL_DATABASE_NAME>
ENABLE_ES: true
ES_SEEDS: elasticsearch
ES_VERSION: v7
TEMPORAL_ADDRESS: temporal:7233 # temporal service address
TEMPORAL_CLI_ADDRESS: temporal:7233 # temporal cli address

# for external postgres database
SQL_TLS: true
SQL_TLS_DISABLE_HOST_VERIFICATION: true
SQL_TLS_ENABLED: true
SQL_HOST_VERIFICATION: false
```

### Service Environment Variables

Key environment variables that can be customized within specific services:
Expand Down