Files
WebNationsGlory_ServeurBuil…/docker-compose.yml

37 lines
1.0 KiB
YAML

version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
network: host
container_name: webnationsglory-admin
env_file:
- .env
environment:
NODE_ENV: ${NODE_ENV:-production}
PORT: ${PORT:-4001}
SERVER_DIR: /mc-server
RCON_HOST: ${RCON_HOST:-localhost}
RCON_PORT: ${RCON_PORT:-25575}
RCON_PASSWORD: ${RCON_PASSWORD:-minecraft}
SESSION_SECRET: ${SESSION_SECRET:-your-secret-key-change-in-production}
volumes:
# Montage relatif du serveur MC (depuis le dossier parent)
- ${MC_SERVER_PATH:-../NationsGlory_ServeurBuild_Red}:/mc-server:ro
- web-admin-data:/app/data
ports:
- "${PORT:-4001}:${PORT:-4001}"
network_mode: host
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:${PORT:-4001}/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
web-admin-data: