Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

You need to configure PostgSail using environment variables. Copy the example file.

cp .env.example .env

Environment Variables Documentation

This document describes all environment variables used in the PostgSail system, organized by category and usage context.

Database Configuration

Environment VariableExampleDescription
POSTGRES_USERpostgresPostgreSQL superuser username for database administration
POSTGRES_PASSWORDchangemePassword for the PostgreSQL superuser for database administration
PGSAIL_AUTHENTICATOR_PASSWORDgenerated_passwordPassword for the PostgREST authenticator role

API Configuration

Environment VariableExampleDescription
PGRST_JWT_SECRETgenerated_secret_min_32_charsJWT secret for PostgREST authentication (minimum 32 characters)
PGSAIL_API_URLhttp://localhost:3000 or https://api.example.comBase URL for the PostgSail API endpoint, API entrypoint from the webapp

Frontend Configuration

Environment VariableExampleDescription
VITE_APP_TITLEPostgSailApplication title displayed in the frontend
VITE_PGSAIL_URL${PGSAIL_API_URL}API URL used by the Vue.js frontend, same as ${PGSAIL_API_URL}
VITE_GRAFANA_URLhttp://localhost:3001 or https://grafana.example.comGrafana dashboard URL for frontend integration

Grafana Configuration

Environment VariableExampleDescription
PGSAIL_GRAFANA_PASSWORDadmin_passwordAdmin password for Grafana dashboard access

External Integrations

Environment VariableExampleDescription
PGSAIL_TELEGRAM_BOT_TOKENbot_token_from_botfatherTelegram bot token for notifications
PGSAIL_EMAIL_SERVERsmtp.example.comSMTP server for email notifications
PGSAIL_EMAIL_USERnotifications@example.comEmail username for SMTP authentication
PGSAIL_EMAIL_PASSemail_passwordEmail password for SMTP authentication
PGSAIL_EMAIL_FROMPostgSail <noreply@example.com>From address for outgoing emails

Push Notifications

Environment VariableExampleDescription
PGSAIL_PUSHOVER_APP_TOKENpushover_tokenPushover application token for push notifications
PGSAIL_PUSHOVER_APP_URLhttps://pushover.net/subscribe/qwertyPushover subscribe endpoint URL

Development Tools

Environment VariableExampleDescription
PGADMIN_DEFAULT_EMAILadmin@example.comDefault email for pgAdmin web interface
PGADMIN_DEFAULT_PASSWORDadmin_passwordDefault password for pgAdmin access

Additional Services

Environment VariableExampleDescription
PGSAIL_APP_URLhttp://localhost:8080 or http://www.example.comMain application URL

Additional parameters are directly set in the docker-compose.yml