- Compose nettoyé en deux profils isolés (sqlite, postgres) avec healthcheck HTTP et network_mode host pour la découverte LAN. - Override docker-compose.bridge.yml pour les environnements où host mode n'est pas disponible (macOS/Windows). - Entrypoint tolérant : fallback prisma db push quand aucune migration n'existe encore. - Dockerfile robuste sans package-lock.json (npm install fallback). - .env.docker.example et docker/README.md pour un démarrage en une commande. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
# ---------------------------------------------------------------
|
|
# IPAM — Variables pour un déploiement Docker
|
|
# ---------------------------------------------------------------
|
|
# Copie ce fichier en `.env` à la racine du projet avant de lancer
|
|
# `docker compose`. Le compose lit `../.env` (env_file).
|
|
# ---------------------------------------------------------------
|
|
|
|
NODE_ENV=production
|
|
|
|
# ---------------------------------------------------------------
|
|
# Base de données
|
|
# ---------------------------------------------------------------
|
|
# Choix par défaut : SQLite — aucune dépendance externe.
|
|
# Pour basculer sur PostgreSQL :
|
|
# 1) Lance le profil postgres : `docker compose --profile postgres up -d`
|
|
# 2) Décommente la section PG ci-dessous et commente celle SQLite.
|
|
DATABASE_PROVIDER=sqlite
|
|
DATABASE_URL="file:/app/data/ipam.db"
|
|
|
|
# --- Variante PostgreSQL --------------------------------------
|
|
# DATABASE_PROVIDER=postgresql
|
|
# DATABASE_URL="postgresql://ipam:ipam@127.0.0.1:5432/ipam?schema=public"
|
|
# POSTGRES_PASSWORD=ipam
|
|
|
|
# ---------------------------------------------------------------
|
|
# Application
|
|
# ---------------------------------------------------------------
|
|
PORT=3000
|
|
APP_URL=http://localhost:3000
|
|
|
|
# Seed initial au premier démarrage (catégories d'apps, etc.)
|
|
RUN_SEED=true
|
|
|
|
# ---------------------------------------------------------------
|
|
# Découverte réseau
|
|
# ---------------------------------------------------------------
|
|
# Adapte la plage à ton LAN (séparées par des virgules)
|
|
DISCOVERY_DEFAULT_CIDRS=192.168.1.0/24
|
|
|
|
DISCOVERY_DEFAULT_PORTS=22,53,80,81,443,445,3000,3306,5432,6379,7878,8080,8081,8096,8123,8443,8989,9000,9090,9091,9117,9443,32400
|
|
DISCOVERY_PING_TIMEOUT=1000
|
|
DISCOVERY_PORT_TIMEOUT=800
|
|
DISCOVERY_CONCURRENCY=32
|
|
DISCOVERY_ENABLE_PING=true
|
|
DISCOVERY_ENABLE_PORT_SCAN=true
|
|
DISCOVERY_ENABLE_ARP=true
|
|
DISCOVERY_ENABLE_MDNS=true
|
|
|
|
# ---------------------------------------------------------------
|
|
# Logs
|
|
# ---------------------------------------------------------------
|
|
LOG_LEVEL=info
|