|
| 1 | +services: |
| 2 | + hytale-server: |
| 3 | + build: . |
| 4 | + image: hytale-server:latest |
| 5 | + container_name: hytale-server |
| 6 | + ports: |
| 7 | + # Default Hytale server port |
| 8 | + - "5520:5520" |
| 9 | + environment: |
| 10 | + # Required: Authentication tokens from Hytale server dashboard |
| 11 | + - HYTALE_SERVER_SESSION_TOKEN=${HYTALE_SERVER_SESSION_TOKEN} |
| 12 | + - HYTALE_SERVER_IDENTITY_TOKEN=${HYTALE_SERVER_IDENTITY_TOKEN} |
| 13 | + - HYTALE_SERVER_OWNER_UUID=${HYTALE_SERVER_OWNER_UUID} |
| 14 | + env_file: |
| 15 | + # Load environment variables from .env file |
| 16 | + - .env |
| 17 | + volumes: |
| 18 | + # Server data (downloaded files, server jar, assets) |
| 19 | + - hytale-data:/app |
| 20 | + # Optional: Mount local config directory for easier access |
| 21 | + # - ./config:/app/config |
| 22 | + # Optional: Mount local worlds directory for backup/restore |
| 23 | + # - ./worlds:/app/worlds |
| 24 | + # Optional: Mount local logs directory |
| 25 | + # - ./logs:/app/logs |
| 26 | + restart: unless-stopped |
| 27 | + stdin_open: true |
| 28 | + tty: true |
| 29 | + # Optional: Resource limits |
| 30 | + # deploy: |
| 31 | + # resources: |
| 32 | + # limits: |
| 33 | + # memory: 4G |
| 34 | + # reservations: |
| 35 | + # memory: 1G |
| 36 | + |
| 37 | + # ============================================================ |
| 38 | + # MULTIPLE SERVER INSTANCES EXAMPLE |
| 39 | + # Uncomment and configure the services below to run multiple |
| 40 | + # Hytale server instances on the same host. |
| 41 | + # Each instance requires its own: |
| 42 | + # - Unique container name |
| 43 | + # - Unique external port mapping |
| 44 | + # - Separate data volume |
| 45 | + # - Own set of authentication tokens |
| 46 | + # ============================================================ |
| 47 | + |
| 48 | + # hytale-server-2: |
| 49 | + # build: . |
| 50 | + # image: hytale-server:latest |
| 51 | + # container_name: hytale-server-2 |
| 52 | + # ports: |
| 53 | + # - "5521:5520" |
| 54 | + # environment: |
| 55 | + # - HYTALE_SERVER_SESSION_TOKEN=${HYTALE_SERVER_2_SESSION_TOKEN} |
| 56 | + # - HYTALE_SERVER_IDENTITY_TOKEN=${HYTALE_SERVER_2_IDENTITY_TOKEN} |
| 57 | + # - HYTALE_SERVER_OWNER_UUID=${HYTALE_SERVER_2_OWNER_UUID} |
| 58 | + # env_file: |
| 59 | + # - .env |
| 60 | + # volumes: |
| 61 | + # - hytale-data-2:/app |
| 62 | + # restart: unless-stopped |
| 63 | + # stdin_open: true |
| 64 | + # tty: true |
| 65 | + |
| 66 | + # hytale-server-3: |
| 67 | + # build: . |
| 68 | + # image: hytale-server:latest |
| 69 | + # container_name: hytale-server-3 |
| 70 | + # ports: |
| 71 | + # - "5522:5520" |
| 72 | + # environment: |
| 73 | + # - HYTALE_SERVER_SESSION_TOKEN=${HYTALE_SERVER_3_SESSION_TOKEN} |
| 74 | + # - HYTALE_SERVER_IDENTITY_TOKEN=${HYTALE_SERVER_3_IDENTITY_TOKEN} |
| 75 | + # - HYTALE_SERVER_OWNER_UUID=${HYTALE_SERVER_3_OWNER_UUID} |
| 76 | + # env_file: |
| 77 | + # - .env |
| 78 | + # volumes: |
| 79 | + # - hytale-data-3:/app |
| 80 | + # restart: unless-stopped |
| 81 | + # stdin_open: true |
| 82 | + # tty: true |
| 83 | + |
| 84 | +volumes: |
| 85 | + hytale-data: |
| 86 | + name: hytale-server-data |
| 87 | + # Optional: Use local driver with specific path |
| 88 | + # driver: local |
| 89 | + # driver_opts: |
| 90 | + # type: none |
| 91 | + # o: bind |
| 92 | + # device: /path/to/your/data |
| 93 | + |
| 94 | + # Additional volumes for multiple instances |
| 95 | + # hytale-data-2: |
| 96 | + # name: hytale-server-2-data |
| 97 | + # hytale-data-3: |
| 98 | + # name: hytale-server-3-data |
0 commit comments