Sur macOS récent, "localhost" résout d'abord en ::1 (IPv6). Si Node bind sur "localhost", il n'écoute que sur ::1. Les clients HTTP (Bruno, certaines libs Node) qui tapent 127.0.0.1 explicitement se prennent un ECONNREFUSED alors que le serveur tourne. 0.0.0.0 bind toutes les interfaces (v4 + v6), pas de surprise.
80 lines
2.5 KiB
Plaintext
80 lines
2.5 KiB
Plaintext
# Node
|
|
TZ=UTC
|
|
PORT=3333
|
|
# 0.0.0.0 plutôt que localhost pour éviter le piège IPv4/IPv6 :
|
|
# - sur macOS récent, "localhost" résout d'abord en ::1 (IPv6)
|
|
# - les clients HTTP qui tapent 127.0.0.1 se prennent un ECONNREFUSED
|
|
# 0.0.0.0 bind toutes les interfaces, donc 127.0.0.1 et ::1 marchent.
|
|
HOST=0.0.0.0
|
|
NODE_ENV=development
|
|
|
|
# App
|
|
LOG_LEVEL=info
|
|
APP_KEY=
|
|
APP_URL=http://${HOST}:${PORT}
|
|
|
|
# Session
|
|
SESSION_DRIVER=cookie
|
|
|
|
#--------------------------------------------------------------------
|
|
# CORS (configure allowed origins for API access)
|
|
#--------------------------------------------------------------------
|
|
# CORS_ORIGIN=http://localhost:5173,http://localhost:3000
|
|
|
|
#--------------------------------------------------------------------
|
|
# Database (Postgres via docker-compose.dev.yml)
|
|
#--------------------------------------------------------------------
|
|
DB_CONNECTION=postgres
|
|
PG_HOST=localhost
|
|
PG_PORT=5433
|
|
PG_USER=rubis
|
|
PG_PASSWORD=rubis
|
|
PG_DB_NAME=rubis_dev
|
|
|
|
#--------------------------------------------------------------------
|
|
# Redis (BullMQ + cache)
|
|
#--------------------------------------------------------------------
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6380
|
|
REDIS_PASSWORD=
|
|
|
|
#--------------------------------------------------------------------
|
|
# Storage (MinIO via S3 driver)
|
|
#--------------------------------------------------------------------
|
|
DRIVE_DISK=s3
|
|
S3_ENDPOINT=http://localhost:9100
|
|
S3_REGION=fr-par
|
|
S3_BUCKET=rubis-invoices
|
|
S3_ACCESS_KEY=rubis
|
|
S3_SECRET_KEY=rubis-dev-secret
|
|
S3_FORCE_PATH_STYLE=true
|
|
|
|
#--------------------------------------------------------------------
|
|
# Mail (Mailhog en dev, Resend en prod)
|
|
#--------------------------------------------------------------------
|
|
MAIL_FROM_ADDRESS=relances@rubis-sur-l-ongle.fr
|
|
MAIL_FROM_NAME=Rubis Sur l'Ongle
|
|
MAIL_DRIVER=smtp
|
|
SMTP_HOST=localhost
|
|
SMTP_PORT=1025
|
|
RESEND_API_KEY=
|
|
|
|
#--------------------------------------------------------------------
|
|
# OCR (Mistral)
|
|
#--------------------------------------------------------------------
|
|
OCR_PROVIDER=mock
|
|
MISTRAL_API_KEY=
|
|
|
|
#--------------------------------------------------------------------
|
|
# Web (URL du SPA, utilisée pour les redirects post-checkin)
|
|
#--------------------------------------------------------------------
|
|
WEB_URL=http://localhost:5173
|
|
|
|
#--------------------------------------------------------------------
|
|
# Auth (refresh tokens)
|
|
#--------------------------------------------------------------------
|
|
ACCESS_TOKEN_TTL_MINUTES=30
|
|
REFRESH_TOKEN_TTL_DAYS=30
|
|
COOKIE_DOMAIN=
|
|
COOKIE_SECURE=false
|
|
LIMITER_STORE=redis |