feat:添加在线安装版本的palworld-server

This commit is contained in:
okxlin 2024-01-24 16:48:09 +08:00
parent 85521870ed
commit ce615dde30
3 changed files with 159 additions and 0 deletions

View File

@ -0,0 +1,15 @@
CONTAINER_NAME="palworld-server"
PANEL_APP_PORT_HTTP="8211"
PANEL_APP_PORT_RCON="25575"
PANEL_APP_PORT_QUERY="27015"
DATA_PATH="./data"
MAX_PLAYERS="32"
MULTITHREAD_SWITCH="true"
PUBLIC_SWITCH="false"
PUBLIC_IP=""
PUBLIC_PORT=""
UPDATE_SWITCH="true"
SERVER_NAME="Default Palworld Server"
ADMIN_PASSWORD="palworld"
SERVER_PASSWORD=""
RCON_SWITCH="false"

View File

@ -0,0 +1,108 @@
additionalProperties:
formFields:
- default: 8211
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: 25575
edit: true
envKey: PANEL_APP_PORT_RCON
labelEn: RCON Port
labelZh: RCON 端口
required: true
rule: paramPort
type: number
- default: 27015
edit: true
envKey: PANEL_APP_PORT_QUERY
labelEn: Query port used to communicate with Steam servers
labelZh: Query 端口 (用于与 Steam 服务器通信的查询端口)
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: DATA_PATH
labelEn: Data folder path
labelZh: 数据文件夹路径
required: true
type: text
- default: 32
edit: true
envKey: MAX_PLAYERS
labelEn: Maximum number of participants on the server
labelZh: 玩家数量限制
required: true
rule: paramPort
type: number
- default: 'true'
edit: true
envKey: MULTITHREAD_SWITCH
labelEn: Improves performance in multi-threaded CPU environments (true / false)
labelZh: 是否启用 CPU 多线程优化 (true / false)
required: true
type: text
- default: 'false'
edit: true
envKey: PUBLIC_SWITCH
labelEn: Setup server as a community server (true / false)
labelZh: 是否启将服务器设置为社区服务器 (true / false)
required: true
type: text
- default: ''
edit: true
envKey: PUBLIC_IP
labelEn: PUBLIC IP (If not specified, it will be detected automatically)
labelZh: 服务器 IP (留空自动检测)
required: false
type: text
- default: ''
edit: true
envKey: PUBLIC_PORT
labelEn: PUBLIC PORT (If not specified, it will be detected automatically)
labelZh: 服务器端口 (留空自动检测)
required: false
rule: paramPort
type: text
- default: 'true'
disabled: true
envKey: UPDATE_SWITCH
labelEn: Whether the server should be update each time start (true / false)
labelZh: 是否每次启动都更新服务器 (true / false)
required: true
type: text
- default: 'Default Palworld Server'
edit: true
envKey: SERVER_NAME
labelEn: Server name
labelZh: 服务器名
required: true
type: text
- default: palworld
edit: true
envKey: ADMIN_PASSWORD
labelEn: Admin password
labelZh: 管理员密码
random: true
required: false
rule: paramComplexity
type: password
- default: ''
edit: true
envKey: SERVER_PASSWORD
labelEn: Server password
labelZh: 服务器密码
required: false
rule: paramComplexity
type: password
- default: 'false'
edit: true
envKey: RCON_SWITCH
labelEn: Enable RCON (true / false)
labelZh: 是否启用 RCON (true / false)
required: true
type: text

View File

@ -0,0 +1,36 @@
version: '3.9'
services:
palworld-server:
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}/udp
- ${PANEL_APP_PORT_RCON}:${PANEL_APP_PORT_RCON}/tcp
- ${PANEL_APP_PORT_QUERY}:${PANEL_APP_PORT_QUERY}/udp
volumes:
- ${DATA_PATH}:/palworld/
environment:
- PUID=1000
- PGID=1000
- PORT=${PANEL_APP_PORT_HTTP}
- PLAYERS=${MAX_PLAYERS}
- MULTITHREADING=${MULTITHREAD_SWITCH}
- COMMUNITY=${PUBLIC_SWITCH}
- PUBLIC_IP=${PUBLIC_IP}
- PUBLIC_PORT=${PUBLIC_PORT}
- UPDATE_ON_BOOT=${UPDATE_SWITCH}
- SERVER_NAME=${SERVER_NAME}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- SERVER_PASSWORD=${SERVER_PASSWORD}
- RCON_ENABLED=${RCON_SWITCH}
- RCON_PORT=${PANEL_APP_PORT_RCON}
- QUERY_PORT=${PANEL_APP_PORT_QUERY}
image: thijsvanloef/palworld-server-docker:v0.12.0
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true