services:
  palworld-server:
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - opsmind-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:8211/udp
      - ${PANEL_APP_PORT_RCON}:25575/tcp
      - ${PANEL_APP_PORT_REST}:8212/tcp
      - ${PANEL_APP_PORT_QUERY}:${PANEL_APP_PORT_QUERY}/udp
    volumes:
      - ./data:/palworld/
    environment:
      - PUID=1000
      - PGID=1000
      - DISABLE_GENERATE_SETTINGS=${DISABLE_GENERATE_SETTINGS}
      - PORT=8211
      - PLAYERS=${MAX_PLAYERS}
      - MULTITHREADING=${MULTITHREAD_SWITCH}
      - COMMUNITY=${PUBLIC_SWITCH}
      - PUBLIC_IP=${PUBLIC_IP}
      - PUBLIC_PORT=${PUBLIC_PORT}
      - UPDATE_ON_BOOT=${UPDATE_SWITCH}
      - ENABLE_PLAYER_LOGGING=${ENABLE_PLAYER_LOGGING}
      - SERVER_NAME=${SERVER_NAME}
      - SERVER_DESCRIPTION=${SERVER_DESCRIPTION}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
      - SERVER_PASSWORD=${SERVER_PASSWORD}
      - RCON_ENABLED=${RCON_SWITCH}
      - RCON_PORT=25575
      - REST_API_ENABLED=${REST_SWITCH}
      - REST_API_PORT=8212
      - QUERY_PORT=${PANEL_APP_PORT_QUERY}
    image: thijsvanloef/palworld-server-docker:v2.3.1
    labels:
      createdBy: "Apps"

networks:
  opsmind-network:  
    external: true
