From dbbe53584c9cb224644213eebe54bf54dbd7770f Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Wed, 29 Apr 2026 12:01:44 +0800 Subject: [PATCH] upd: sync compose.yml and .env.example with all env vars in env.ts Add missing required vars: API_KEY, MINIO_*, and optional REDIS_URL, BUN_PUBLIC_BASE_URL Co-Authored-By: Claude Sonnet 4.6 --- .env.example | 17 +++++++++++++---- compose.yml | 21 +++++++++++++++++---- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 6721966..fed4a5b 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ # App PORT=3000 NODE_ENV=development +BUN_PUBLIC_BASE_URL=http://localhost:3000 # Dev Inspector REACT_EDITOR=code @@ -13,12 +14,20 @@ DIRECT_URL=postgresql://user:password@localhost:5432/base-template GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= -# Role +# Super Admin (comma-separated emails) SUPER_ADMIN_EMAIL=admin@example.com # API Key for external clients (e.g. mobile apps) API_KEY=your-secret-api-key-here -# Telegram Notification (optional) -TELEGRAM_NOTIFY_TOKEN= -TELEGRAM_NOTIFY_CHAT_ID= +# MinIO (object storage for bug report images) +MINIO_ENDPOINT= +MINIO_PORT=443 +MINIO_USE_SSL=true +MINIO_ACCESS_KEY= +MINIO_SECRET_KEY= +MINIO_BUCKET= +MINIO_UPLOAD_DIR=bug-reports + +# Redis (optional — enables App Logs feature on /dev) +REDIS_URL= diff --git a/compose.yml b/compose.yml index aaaca7d..43b44b7 100644 --- a/compose.yml +++ b/compose.yml @@ -4,17 +4,30 @@ services: container_name: monitoring-app-stg restart: unless-stopped environment: + # App + - PORT=${PORT:-3000} + - NODE_ENV=${NODE_ENV:-production} + - BUN_PUBLIC_BASE_URL=${BUN_PUBLIC_BASE_URL} # Database - DATABASE_URL=${DATABASE_URL} - DIRECT_URL=${DIRECT_URL} # Google OAuth - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID} - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET} - # App - - PORT=${PORT:-3000} - - NODE_ENV=${NODE_ENV:-production} - # Admin (initial Super Admin emails, comma-separated) + # Super Admin - SUPER_ADMIN_EMAIL=${SUPER_ADMIN_EMAIL} + # API Key + - API_KEY=${API_KEY} + # MinIO (object storage) + - MINIO_ENDPOINT=${MINIO_ENDPOINT} + - MINIO_PORT=${MINIO_PORT:-443} + - MINIO_USE_SSL=${MINIO_USE_SSL:-true} + - MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY} + - MINIO_SECRET_KEY=${MINIO_SECRET_KEY} + - MINIO_BUCKET=${MINIO_BUCKET} + - MINIO_UPLOAD_DIR=${MINIO_UPLOAD_DIR:-bug-reports} + # Redis (optional — app logs feature) + - REDIS_URL=${REDIS_URL:-} networks: - public-net - postgres-net-stg