services:
  palworld-server:
    image: thijsvanloef/palworld-server-docker:latest
    container_name: palworld-server
    restart: unless-stopped
    ports:
      - "8211:8211/udp"      # Game port
      - "27016:27016/udp"    # Query port (27015 used by gmod)
      - "25575:25575/tcp"    # RCON (Tailscale-only access)
    environment:
      - PUID=1000
      - PGID=1000
      - PORT=8211
      - QUERY_PORT=27016
      - PLAYERS=16
      - MULTITHREADING=true
      - COMMUNITY=false
      - SERVER_NAME=Vish Palworld
      - SERVER_PASSWORD="REDACTED_PASSWORD"
      - ADMIN_PASSWORD="REDACTED_PASSWORD"
      - RCON_ENABLED=true
      - RCON_PORT=25575
      - UPDATE_ON_BOOT=true
      - TZ=America/Los_Angeles
    volumes:
      - palworld-data:/palworld
    deploy:
      resources:
        limits:
          cpus: "8"
          memory: 16G
        reservations:
          cpus: "2"
          memory: 4G
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"
    networks:
      - palworld-network

volumes:
  palworld-data:

networks:
  palworld-network:
    driver: bridge
