diff --git a/frontend/docs/pages/self-hosting/configuration-options.mdx b/frontend/docs/pages/self-hosting/configuration-options.mdx index a5170ef38..e0b7735fa 100644 --- a/frontend/docs/pages/self-hosting/configuration-options.mdx +++ b/frontend/docs/pages/self-hosting/configuration-options.mdx @@ -21,17 +21,18 @@ The Hatchet server and engine can be configured via `SERVER` and `DATABASE` envi ## Database Configuration -| Variable | Description | Default Value | -| ---------------------------- | ------------------------ | ------------- | -| `DATABASE_POSTGRES_HOST` | PostgreSQL host | `127.0.0.1` | -| `DATABASE_POSTGRES_PORT` | PostgreSQL port | `5431` | -| `DATABASE_POSTGRES_USERNAME` | PostgreSQL username | `hatchet` | -| `DATABASE_POSTGRES_PASSWORD` | PostgreSQL password | `hatchet` | -| `DATABASE_POSTGRES_DB_NAME` | PostgreSQL database name | `hatchet` | -| `DATABASE_POSTGRES_SSL_MODE` | PostgreSQL SSL mode | `disable` | -| `DATABASE_MAX_CONNS` | Max database connections | `5` | -| `DATABASE_LOG_QUERIES` | Log database queries | `false` | -| `CACHE_DURATION` | Cache duration | `60s` | +| Variable | Description | Default Value | +| ---------------------------- | ---------------------------- | ------------- | +| `DATABASE_URL` | PostgreSQL connection string | `127.0.0.1` | +| `DATABASE_POSTGRES_HOST` | PostgreSQL host | `127.0.0.1` | +| `DATABASE_POSTGRES_PORT` | PostgreSQL port | `5431` | +| `DATABASE_POSTGRES_USERNAME` | PostgreSQL username | `hatchet` | +| `DATABASE_POSTGRES_PASSWORD` | PostgreSQL password | `hatchet` | +| `DATABASE_POSTGRES_DB_NAME` | PostgreSQL database name | `hatchet` | +| `DATABASE_POSTGRES_SSL_MODE` | PostgreSQL SSL mode | `disable` | +| `DATABASE_MAX_CONNS` | Max database connections | `5` | +| `DATABASE_LOG_QUERIES` | Log database queries | `false` | +| `CACHE_DURATION` | Cache duration | `60s` | ## Security Check Configuration diff --git a/frontend/docs/pages/self-hosting/docker-compose.mdx b/frontend/docs/pages/self-hosting/docker-compose.mdx index ac105d6f7..65d463fc4 100644 --- a/frontend/docs/pages/self-hosting/docker-compose.mdx +++ b/frontend/docs/pages/self-hosting/docker-compose.mdx @@ -75,8 +75,6 @@ services: command: /hatchet/hatchet-admin quickstart --skip certs --generated-config-dir /hatchet/config --overwrite=false environment: DATABASE_URL: "postgres://hatchet:hatchet@postgres:5432/hatchet" - DATABASE_POSTGRES_PORT: "5432" - DATABASE_POSTGRES_HOST: "postgres" SERVER_TASKQUEUE_RABBITMQ_URL: amqp://user:password@rabbitmq:5672/ SERVER_AUTH_COOKIE_DOMAIN: localhost:8080 SERVER_AUTH_COOKIE_INSECURE: "t" diff --git a/frontend/docs/pages/self-hosting/hatchet-lite.mdx b/frontend/docs/pages/self-hosting/hatchet-lite.mdx index ac56ba39e..06ce46121 100644 --- a/frontend/docs/pages/self-hosting/hatchet-lite.mdx +++ b/frontend/docs/pages/self-hosting/hatchet-lite.mdx @@ -49,8 +49,6 @@ services: RABBITMQ_DEFAULT_USER: "user" RABBITMQ_DEFAULT_PASS: "password" DATABASE_URL: "postgresql://hatchet:hatchet@postgres:5432/hatchet?sslmode=disable" - DATABASE_POSTGRES_PORT: "5432" - DATABASE_POSTGRES_HOST: "postgres" SERVER_TASKQUEUE_RABBITMQ_URL: amqp://user:password@localhost:5672/ SERVER_AUTH_COOKIE_DOMAIN: localhost SERVER_AUTH_COOKIE_INSECURE: "t" diff --git a/frontend/docs/pages/self-hosting/kubernetes-external-database.mdx b/frontend/docs/pages/self-hosting/kubernetes-external-database.mdx index b1916149a..a3cbb0bcc 100644 --- a/frontend/docs/pages/self-hosting/kubernetes-external-database.mdx +++ b/frontend/docs/pages/self-hosting/kubernetes-external-database.mdx @@ -4,6 +4,8 @@ To connect to an external Postgres instance, set `postgres.enabled` to `false` in the `values.yaml` file. This will disable the internal Postgres instance and allow you to connect to an external database. You should then add the following configuration for the `hatchet-stack` or `hatchet-ha` charts: +> Note: Either `DATABASE_URL` or `DATABASE_POSTGRES_*` are required + ```yaml sharedConfig: env: diff --git a/hack/db/atlas-apply.sh b/hack/db/atlas-apply.sh index bec83b0b5..fd2d21b30 100644 --- a/hack/db/atlas-apply.sh +++ b/hack/db/atlas-apply.sh @@ -40,7 +40,6 @@ if [[ ! "$DATABASE_URL" =~ sslmode ]]; then fi fi -echo "DATABASE_URL: $DATABASE_URL" # Check for prisma migrations MIGRATION_NAME=$(psql "$DATABASE_URL" -t -c "SELECT migration_name FROM _prisma_migrations ORDER BY started_at DESC LIMIT 1;" 2>/dev/null | xargs) MIGRATION_NAME=$(echo $MIGRATION_NAME | cut -d'_' -f1)