games_app/.env.docker.example
2026-07-07 15:03:17 +02:00

75 lines
2.6 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.
# =============================================================================
NODE_ENV=production
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_PORT=6379
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_NODE_URL=https://api.shasta.trongrid.io
TRON_CONFIRMATIONS=3
USDT_TRC20_CONTRACT=
POLYGON_RPC_URL=https://rpc-amoy.polygon.technology
POLYGON_CONFIRMATIONS=8
USDC_POLYGON_CONTRACT=
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
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