# Product deploy: run on a CLOUD VM (Oracle free, Hetzner, AWS, etc.) # Source of truth: Hugging Face repo manus4oHER/metin2-private-server # Your laptop is NOT the host. name: metin2-private-server services: database: image: mysql:8.0 restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-changeme} volumes: - db_data:/var/lib/mysql - ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-p${DB_ROOT_PASSWORD:-changeme}"] interval: 10s timeout: 5s retries: 30 start_period: 40s networks: [m2net] cache: image: redis:7-alpine restart: unless-stopped networks: [m2net] auth: build: context: ./open-mt2 dockerfile: Dockerfile restart: unless-stopped environment: DB_HOST: database CACHE_HOST: cache AUTH_SERVER_ADDRESS: "0.0.0.0" AUTH_SERVER_PORT: "11002" DB_PORT: "3306" DB_USER: root DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-changeme} AUTH_DB_DATABASE_NAME: auth GAME_DB_DATABASE_NAME: game CACHE_PORT: "6379" LOG_LEVEL: info NODE_ENV: production ports: - "11002:11002" depends_on: database: condition: service_healthy cache: condition: service_started command: ["node", "src/auth/main.js"] networks: [m2net] game: build: context: ./open-mt2 dockerfile: Dockerfile restart: unless-stopped environment: DB_HOST: database CACHE_HOST: cache GAME_SERVER_ADDRESS: "0.0.0.0" REAL_SERVER_ADDRESS: ${PUBLIC_IP:-0.0.0.0} GAME_SERVER_PORT: "13001" DB_PORT: "3306" DB_USER: root DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-changeme} AUTH_DB_DATABASE_NAME: auth GAME_DB_DATABASE_NAME: game CACHE_PORT: "6379" LOG_LEVEL: info NODE_ENV: production ports: - "13001:13001" depends_on: database: condition: service_healthy cache: condition: service_started auth: condition: service_started command: ["node", "--max-old-space-size=2048", "src/game/main.js"] networks: [m2net] volumes: db_data: networks: m2net: driver: bridge