update veloren

This commit is contained in:
Quinten 2022-09-07 18:16:06 +02:00 committed by GitHub
parent 78fdc68de5
commit eb58300a7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 30 deletions

View File

@ -1,31 +1,72 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2021-07-02T04:27:30+03:00",
"exported_at": "2022-09-07T18:12:29+02:00",
"name": "Veloren",
"author": "parker@parkervcp.com",
"description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.",
"features": null,
"images": [
"quay.io\/parkervcp\/pterodactyl-images:base_debian"
],
"docker_images": {
"DEBIAN": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": ".\/veloren-server-cli",
"config": {
"files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" gameserver_address\": \" gameserver_address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n\t \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}",
"files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" gameserver_address\": \" gameserver_address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n \" metrics_address\": \" metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Server is ready to accept connections\"\r\n}",
"logs": "{}",
"stop": "shutdown graceful 10"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl git-lfs\r\n\r\nmkdir -p \/mnt\/server\/assets\r\n\r\ncd \/tmp.\r\n\r\ngit clone https:\/\/gitlab.com\/veloren\/veloren.git\r\n\r\n## build veloran server cli\r\nexport VELOREN_USERDATA_STRATEGY=executable\r\ncd veloren\r\necho -e \"building veloran server, this is gonna take a bit\" \r\ncargo build --bin veloren-server-cli --release\r\n\r\ncp -f target\/release\/veloren-server-cli \/mnt\/server\/\r\ncp -Rf assets\/{common,server,world} \/mnt\/server\/assets\/\r\n\r\n## get config from repo because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n echo -e \"getting default config from git repo\"\r\n curl -sSL https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo -e \"config pulled\"\r\nfi\r\n\r\necho -e \"install complete\"",
"container": "rust:slim-buster",
"script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n echo -e \"creating default config\"\r\n echo -n \"(\r\n gameserver_address: \"0.0.0.0:14004\",\r\n metrics_address: \"0.0.0.0:14005\",\r\n auth_server_address: Some(\"https:\/\/auth.veloren.net\"),\r\n max_players: 100,\r\n world_seed: 25269,\r\n server_name: \"Veloren Alpha\",\r\n start_time: 32400,\r\n map_file: None,\r\n max_view_distance: Some(65),\r\n banned_words_files: [],\r\n max_player_group_size: 6,\r\n client_timeout: (\r\n secs: 40,\r\n nanos: 0,\r\n ),\r\n spawn_town: None,\r\n safe_spawn: true,\r\n max_player_for_kill_broadcast: Some(20),\r\n)\r\n\" > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo -e \"config pulled\"\r\nfi\r\n\r\necho -e \"install complete\"",
"container": "debian:bullseye-slim",
"entrypoint": "bash"
}
},
"variables": []
"variables": [
{
"name": "Version",
"description": "The version you want weekly or nightly",
"env_variable": "VERSION",
"default_value": "weekly",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|in:weekly,nightly",
"field_type": "text"
},
{
"name": "Release date",
"description": "The date of the version you want look here:\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\neverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26",
"env_variable": "RELEASE_DATE",
"default_value": "2022-08-31T08_26",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:40",
"field_type": "text"
},
{
"name": "Server name",
"description": "The name your server will be displaying",
"env_variable": "SERVER_NAME",
"default_value": "A ptero hosted server",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:64",
"field_type": "text"
},
{
"name": "Metrics port",
"description": "Game port +1",
"env_variable": "METRICS_PORT",
"default_value": "14005",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer",
"field_type": "text"
}
]
}

View File

@ -1,20 +0,0 @@
(
gameserver_address: "0.0.0.0:14004",
metrics_address: "0.0.0.0:14005",
auth_server_address: Some("https://auth.veloren.net"),
max_players: 100,
world_seed: 25269,
server_name: "Veloren Alpha",
start_time: 32400,
map_file: None,
max_view_distance: Some(65),
banned_words_files: [],
max_player_group_size: 6,
client_timeout: (
secs: 40,
nanos: 0,
),
spawn_town: None,
safe_spawn: true,
max_player_for_kill_broadcast: None,
)