Load runtime config from server .env via compose env_file

Keep secrets out of the image; only override DATABASE_URL host for the Docker network.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 21:29:21 +03:30
co-authored by Cursor
parent 1fdbae1791
commit 1b249e0b57
2 changed files with 21 additions and 18 deletions
+14 -11
View File
@@ -1,20 +1,23 @@
# Local / host Prisma
DATABASE_URL="postgresql://fabric:fabric123@localhost:5432/fabric_trade?schema=public"
# این فایل فقط روی سرور/لوکال می‌ماند و داخل گیت commit نمی‌شود.
# ایمیج Docker سکرت ندارد؛ همه تنظیمات از اینجا خوانده می‌شود.
# Docker Compose
POSTGRES_USER=fabric
POSTGRES_PASSWORD=fabric123
POSTGRES_DB=fabric_trade
POSTGRES_PORT=5432
# برای ابزارهای روی خود سرور (خارج از Docker)
DATABASE_URL=postgresql://fabric:fabric123@localhost:5432/fabric_trade?schema=public
API_PORT=3000
PORT=3000
API_IMAGE=fabric-trade-api:latest
RUN_SEED=false
# میرور npm کامل (سازگار با package-lock)
# توجه: mirror.iranserver.com/npm ناقص است و 404 می‌دهد
JWT_SECRET=change-me-to-a-long-random-string
JWT_EXPIRES_IN=7d
MOCK_OTP_CODE=123456
OTP_TTL_MINUTES=5
NPM_REGISTRY=https://registry.npmmirror.com
COMPOSE_BAKE=false
JWT_SECRET="fabric-trade-dev-secret-change-me"
JWT_EXPIRES_IN="7d"
PORT=3000
MOCK_OTP_CODE="123456"
OTP_TTL_MINUTES=5