From ce615dde302caf494ec9ff7ef50ff4230d69aab1 Mon Sep 17 00:00:00 2001 From: okxlin Date: Wed, 24 Jan 2024 16:48:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=89=88=E6=9C=AC=E7=9A=84palworld-server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/palworld-server/0.12.0/.env.sample | 15 +++ apps/palworld-server/0.12.0/data.yml | 108 ++++++++++++++++++ .../palworld-server/0.12.0/docker-compose.yml | 36 ++++++ 3 files changed, 159 insertions(+) create mode 100644 apps/palworld-server/0.12.0/.env.sample create mode 100644 apps/palworld-server/0.12.0/data.yml create mode 100644 apps/palworld-server/0.12.0/docker-compose.yml diff --git a/apps/palworld-server/0.12.0/.env.sample b/apps/palworld-server/0.12.0/.env.sample new file mode 100644 index 00000000..0c37e6d3 --- /dev/null +++ b/apps/palworld-server/0.12.0/.env.sample @@ -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" diff --git a/apps/palworld-server/0.12.0/data.yml b/apps/palworld-server/0.12.0/data.yml new file mode 100644 index 00000000..dc4e1301 --- /dev/null +++ b/apps/palworld-server/0.12.0/data.yml @@ -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 diff --git a/apps/palworld-server/0.12.0/docker-compose.yml b/apps/palworld-server/0.12.0/docker-compose.yml new file mode 100644 index 00000000..b685a533 --- /dev/null +++ b/apps/palworld-server/0.12.0/docker-compose.yml @@ -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