Skip to content

armgit / posta

Public Imported from GitHub
0

Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.

add .env.example

Jonas Kaninda86821bb8e881
diff --git a/examples/.env.example b/examples/.env.example
new file mode 100644
index 0000000..7bab4a5
--- /dev/null
+++ b/examples/.env.example
@@ -0,0 +1,88 @@
+# Server
+# HTTP server port
+POSTA_PORT=9000
+# Environment (dev, production)
+POSTA_ENV=production
+
+# Database (PostgreSQL)
+POSTA_DB_HOST=localhost
+POSTA_DB_USER=posta
+POSTA_DB_PASSWORD=posta
+POSTA_DB_NAME=posta
+POSTA_DB_PORT=5432
+POSTA_DB_SSL_MODE=disable
+# PostgreSQL connection string (overrides individual DB settings)
+POSTA_DB_URL=
+
+# Redis
+POSTA_REDIS_ADDR=localhost:6379
+POSTA_REDIS_PASSWORD=
+
+# JWT signing secret — change this in production!
+POSTA_JWT_SECRET=change-me-in-production
+
+# Store emails without sending (useful for development)
+POSTA_DEV_MODE=false
+# Enable auth (login/register) rate limiting
+POSTA_AUTH_RATE_LIMIT_ENABLED=true
+# Hourly email limit per user
+POSTA_RATE_LIMIT_HOURLY=100
+# Daily email limit per user
+POSTA_RATE_LIMIT_DAILY=1000
+
+# Default admin credentials
+POSTA_ADMIN_PASSWORD=admin1234
+
+# Enable Swagger UI and ReDoc
+POSTA_OPENAPI_DOCS=true
+
+# Enable Prometheus metrics
+POSTA_METRICS_ENABLED=false
+
+# Vue build directory (uncomment for development)
+# POSTA_WEB_DIR=web/dist
+# Public URL
+POSTA_WEB_URL=https://posta.example.com
+
+# Allowed CORS origins
+POSTA_CORS_ORIGINS=*
+
+# Worker
+# Run worker in server process
+POSTA_EMBEDDED_WORKER=true
+# Worker concurrency
+POSTA_WORKER_CONCURRENCY=10
+# Email retry attempts
+POSTA_WORKER_MAX_RETRIES=5
+
+# Webhook delivery retry attempts
+POSTA_WEBHOOK_MAX_RETRIES=3
+# Webhook request timeout in seconds
+POSTA_WEBHOOK_TIMEOUT_SECS=10
+# Webhook HTTP proxy URL (optional)
+# POSTA_WEBHOOK_PROXY_URL=
+
+# Google OAuth client ID for SSO login
+# POSTA_GOOGLE_OAUTH_CLIENT_ID=your-client-id
+# Google OAuth client secret for SSO login
+# POSTA_GOOGLE_OAUTH_CLIENT_SECRET=your-secret
+# OAuth callback base URL (optional if POSTA_WEB_URL is defined)
+POSTA_OAUTH_CALLBACK_URL=https://posta.example.com
+
+# Blob storage (s3 or filesystem)
+# POSTA_BLOB_PROVIDER=
+# S3-compatible storage settings
+# POSTA_BLOB_S3_ENDPOINT=
+# POSTA_BLOB_S3_REGION=us-east-1
+# POSTA_BLOB_S3_BUCKET=
+# POSTA_BLOB_S3_ACCESS_KEY=
+# POSTA_BLOB_S3_SECRET_KEY=
+# POSTA_BLOB_S3_USE_SSL=true
+# POSTA_BLOB_S3_PATH_STYLE=false
+# Filesystem storage path
+# POSTA_BLOB_FS_PATH=/data/attachments
+
+# Encryption key for SMTP server passwords (AES-256-GCM)
+# If empty, passwords are stored with base64 encoding only
+# POSTA_ENCRYPTION_KEY=
\ No newline at end of file