File size: 1,548 Bytes
3768ef0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 'Quantum Core X'
services:

  # authentication service
  auth:
    image: ghcr.io/meikellp/quantum-core-x/auth
    restart: unless-stopped
    ports:
    - "11000:11000"
    volumes:
    - ./auth.appsettings.json:/app/appsettings.json:ro
    depends_on:
      db-mysql:
        condition: service_healthy
      cache:
        condition: service_healthy
  # game service
  game:
    image: ghcr.io/meikellp/quantum-core-x/game
    restart: unless-stopped
    ports:
    - 13000:13000
    volumes:
    - ./game.appsettings.json:/app/appsettings.json:ro
    - ./data:/app/data:ro
    depends_on:
      db-mysql:
        condition: service_healthy
      cache:
        condition: service_healthy

  # redis holds live data of the game world
  # used as distributed memory between server nodes
  cache:
    image: redis:latest
    restart: unless-stopped
    volumes:
    - cache_data:/data
    healthcheck:
      test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
      interval: 10s
      timeout: 5s
      retries: 3

  # persistent storage
  db-mysql:
    image: mariadb:12.3
    hostname: db
    environment:
    - MARIADB_USER=metin2
    - MARIADB_PASSWORD=metin2
    - MARIADB_DATABASE=metin2
    - MARIADB_ROOT_PASSWORD=supersecure.123
    volumes:
    - db_data_mysql:/var/lib/mysql
    healthcheck:
      test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
      interval: 10s
      timeout: 5s
      retries: 3

volumes:
  cache_data:
  db_data_mysql: