93 lines
3.7 KiB
Plaintext
93 lines
3.7 KiB
Plaintext
# =============================================================================
|
|
# Docker LOCAL — même stack que le VPS (redis, nginx :9080, Postgres sur l'HÔTE)
|
|
#
|
|
# cp .env.docker.example .env.docker
|
|
# # Éditer POSTGRES_PASSWORD, secrets (JWT, ENCRYPTION_KEY, PLATFORM_MNEMONIC, INITIAL_SETUP_TOKEN)
|
|
# # Créer la base sur PostgreSQL local : games_platform_db
|
|
# npm run docker:local:init # 1er démarrage : migrate puis up (une seule commande)
|
|
# npm run docker:local:up # démarrages suivants
|
|
# npm run docker:local:migrate # après changement de schéma
|
|
# npm run docker:local:reset-password -- email@example.com 'NewPassword1!' # mot de passe oublié (dev)
|
|
# open http://localhost:9080/setup
|
|
#
|
|
# Comme le VPS : les conteneurs utilisent host.docker.internal (pas localhost).
|
|
# Seule différence vs VPS : URLs localhost au lieu du domaine public.
|
|
# Le fichier .env.docker reste local (gitignore) — le VPS garde son propre .env.
|
|
# =============================================================================
|
|
|
|
# Local Docker = Shasta testnet → must NOT be production (networkGuard blocks testnet URLs).
|
|
# VPS .env keeps NODE_ENV=production with mainnet TRON/Polygon.
|
|
NODE_ENV=development
|
|
|
|
POSTGRES_USER=postgres
|
|
POSTGRES_PASSWORD=local_dev_postgres_password
|
|
POSTGRES_DB=games_platform_db
|
|
POSTGRES_PORT=5432
|
|
PGBOUNCER_PORT=6432
|
|
|
|
# Conteneurs Docker → PostgreSQL installé sur Windows (comme le VPS)
|
|
DATABASE_URL=postgresql://postgres:local_dev_postgres_password@host.docker.internal:5432/games_platform_db
|
|
DATABASE_PASSWORD=local_dev_postgres_password
|
|
|
|
RUN_MIGRATE_ON_START=0
|
|
|
|
BACKEND_PORT=4000
|
|
WS_PORT=4001
|
|
# Redis stays internal to Docker (no host port). Password required by compose.
|
|
REDIS_PASSWORD=local-dev-redis-password-change-me-32chars
|
|
WORKER_ID=worker-1
|
|
|
|
JWT_SECRET=local-dev-jwt-secret-min-32-chars-change-me
|
|
JWT_ACCESS_EXPIRY=15m
|
|
JWT_REFRESH_EXPIRY=7d
|
|
ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
PLATFORM_MNEMONIC=abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
|
|
|
|
# TRON Shasta testnet (local Docker = testnet, pas mainnet)
|
|
TRON_NODE_URL=https://api.shasta.trongrid.io
|
|
TRON_CONFIRMATIONS=3
|
|
# OBLIGATOIRE sur Shasta : sans cette variable, le backend utilise le contrat USDT
|
|
# mainnet par défaut (TR7NHq… en base) alors que TRON_NODE_URL pointe Shasta — les
|
|
# dépôts test (Telegram !shasta_usdt, faucets) ne seront jamais détectés.
|
|
# Même adresse que .env.testnet — ne pas laisser vide.
|
|
USDT_TRC20_CONTRACT=TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs
|
|
|
|
# Polygon Amoy testnet
|
|
POLYGON_RPC_URL=https://rpc-amoy.polygon.technology
|
|
POLYGON_CONFIRMATIONS=8
|
|
# Même logique que USDT : contrat Amoy requis pour créditer les USDC de test (Circle faucet).
|
|
USDC_POLYGON_CONTRACT=0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582
|
|
ALLOW_WITHDRAWALS=false
|
|
RATE_LIMIT_MAX=2000
|
|
|
|
PREDIQO_HTTP_PORT=9080
|
|
PREDIQO_HTTPS_PORT=9443
|
|
|
|
CERTBOT_EMAIL=dev@localhost
|
|
CERTBOT_DOMAIN1=localhost
|
|
APP_PUBLIC_URL=http://localhost:9080
|
|
INITIAL_SETUP_TOKEN=local-docker-setup-token-min-32-chars
|
|
|
|
# Figées au build prediqo-web — doivent correspondre au port nginx local
|
|
VITE_API_BASE_URL=http://localhost:9080
|
|
VITE_WS_ENABLED=true
|
|
VITE_WS_URL=ws://localhost:9080/ws/v1/games/candle-predict
|
|
|
|
# Compose builds REDIS_URL with REDIS_PASSWORD for containers
|
|
REDIS_ENABLED=true
|
|
REDIS_ROUND_CACHE=true
|
|
BET_ASYNC=true
|
|
WS_ENABLED=true
|
|
WS_PATH=/ws/v1/games/candle-predict
|
|
|
|
EMAIL_TRANSPORT=console
|
|
|
|
# Local Docker: skip mandatory admin 2FA (production should leave this unset or true)
|
|
REQUIRE_ADMIN_2FA=false
|
|
|
|
# ClamAV (optional locally). Production VPS: CLAMAV_ENABLED=true + docker compose --profile clamav
|
|
# CLAMAV_ENABLED=false
|
|
# CLAMAV_HOST=clamav
|
|
# CLAMAV_PORT=3310
|
|
# CLAMAV_TIMEOUT_MS=30000
|