initial commit

This commit is contained in:
Maik Laschober 2020-07-24 08:53:22 +02:00
commit 9c17fcac50
8 changed files with 783 additions and 0 deletions

27
Dockerfile Normal file
View file

@ -0,0 +1,27 @@
# ============== download stage ==================
FROM alpine as downloader
WORKDIR /download
ENV VSVERSION 1.12.14
RUN wget "https://cdn.vintagestory.at/gamefiles/stable/vs_server_${VSVERSION}.tar.gz"
RUN tar xzf "vs_server_${VSVERSION}.tar.gz"
RUN rm "vs_server_${VSVERSION}.tar.gz"
# ============== runtime stage ==================
FROM mono:latest as runtime
WORKDIR /game
ENV VSDATAPATH vs
COPY --from=downloader "./download/" "/game"
COPY "./serverconfig.json" "/gamedata/${VSDATAPATH}/serverconfig.json"
# CMD [ "mono" , "VintagestoryServer.exe", "--dataPath", "/gamedata/${VSDATAPATH}" ]
CMD mono VintagestoryServer.exe --dataPath "/gamedata/${VSDATAPATH}"
# Expose ports
EXPOSE 42420/tcp

17
NOTE.md Normal file
View file

@ -0,0 +1,17 @@
# Contribution note
just some notes for myself in case i forgot how to upgrade the image
```sh
#build
docker build -t devidian/vintagestory .
#push
docker push devidian/vintagestory
#run
docker run -pd 42420:42420 --name VintageStoryServer vintagestory
# --------------------------------------
# --------- using composer -------------
#start
docker-compose up -d
#stop
docker-compose down
```

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# Run this image
To run this image you can use `docker run -pd 42420:42420 --name VintageStoryServer devidian/vintagestory`, but you may want to use a customized version for your needs so see `./build-custom-example/README.md`

View file

@ -0,0 +1,16 @@
# ============== runtime stage ==================
FROM devidian/vintagestory:latest as runtime
WORKDIR /game
ENV VSDATAPATH vs-custom
# update with your own serverconfig
COPY "./serverconfig.json" "/gamedata/${VSDATAPATH}/serverconfig.json"
# CMD [ "mono" , "VintagestoryServer.exe", "--dataPath", "/gamedata/${VSDATAPATH}" ]
CMD mono VintagestoryServer.exe --dataPath "/gamedata/${VSDATAPATH}"
# Expose ports
EXPOSE 42420/tcp

View file

@ -0,0 +1,14 @@
# Create custom docker image
You can use this `Dockerfile` to create your own serverconfig using `devidian/vintagestory` as base. Just edit serverconfig.json and run `docker build -t YOUR_IMAGE_NAME`. You may also add / override additional files like mods.
## Run custom docker image
to run the image you can either use `docker run -pd 42420:42420 --name VintageStoryServer YOUR_IMAGE_NAME` or use the composer file as follows (dont forget to change `YOUR_IMAGE_NAME` in `docker-composer.yml`)
```bash
cd run;
#start
docker-compose up -d
#stop
docker-compose down
```

View file

@ -0,0 +1,12 @@
version: '3'
services:
vsserver:
image: YOUR_IMAGE_NAME
container_name: vsserver
volumes:
- gamedata:/gamedata
ports:
- "42420:42420"
volumes:
gamedata:

View file

@ -0,0 +1,347 @@
{
"ConfigVersion": "1.3",
"ServerMonitor": true,
"MasterserverUrl": "http://masterserver.vintagestory.at/api/v1/servers/",
"ClientConnectionTimeout": 600,
"ClientPlayingTimeout": 60,
"BuildLogging": false,
"EntityDebugMode": false,
"MapSizeX": 1000000,
"MapSizeY": 256,
"MapSizeZ": 1000000,
"ServerLanguage": "de",
"SkipEveryChunkRow": 0,
"SkipEveryChunkRowWidth": 0,
"ModPaths": [
"Mods",
"/gamedata/vs-custom/Mods"
],
"WorldConfig": {
"Seed": null,
"SaveFileLocation": "/gamedata/vs-custom/Saves/default.vcdbs",
"WorldName": "VintageDockerExample",
"AllowCreativeMode": true,
"PlayStyle": "surviveandbuild",
"PlayStyleLangCode": "surviveandbuild-bands",
"WorldType": "standard",
"WorldConfiguration": null,
"MapSizeY": null,
"CreatedByPlayerName": null,
"DisabledMods": null
},
"NextPlayerGroupUid": 10,
"GroupChatHistorySize": 20,
"MaxOwnedGroupChannelsPerUser": 10,
"ServerName": "DE - VintageDockerExample - CustomBuild",
"ServerUrl": null,
"ServerDescription": "VintageServer running in Docker container",
"WelcomeMessage": "Welcome {0}, may you survive well and prosper",
"Ip": null,
"Port": 42420,
"Upnp": false,
"CompressPackets": true,
"AdvertiseServer": true,
"MaxClients": 16,
"Password": "",
"MaxChunkRadius": 12,
"TickTime": 33.3333321,
"BlockTickChunkRange": 3,
"MaxMainThreadBlockTicks": 10000,
"RandomBlockTicksPerChunk": 16,
"BlockTickInterval": 300,
"Roles": [
{
"Code": "suvisitor",
"Name": "Survival Visitor",
"Description": "Can only visit this world and chat but not use/place/break anything",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"chat"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "Green",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "crvisitor",
"Name": "Creative Visitor",
"Description": "Can only visit this world, chat and fly but not use/place/break anything",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"chat"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "DarkGray",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "limitedsuplayer",
"Name": "Limited Survival Player",
"Description": "Can use/place/break blocks only in permitted areas (priv level -1), create/manage player groups and chat",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"build",
"useblock",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "White",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "limitedcrplayer",
"Name": "Limited Creative Player",
"Description": "Can use/place/break blocks in only in permitted areas (priv level -1), create/manage player groups, chat, fly and set his own game mode (= allows fly and change of move speed)",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"build",
"useblock",
"gamemode",
"freemove",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "LightGreen",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "suplayer",
"Name": "Survival Player",
"Description": "Can use/place/break blocks in unprotected areas (priv level 0), create/manage player groups and chat. Can claim an area of up to 8 chunks.",
"PrivilegeLevel": 0,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "White",
"LandClaimAllowance": 262144,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "crplayer",
"Name": "Creative Player",
"Description": "Can use/place/break blocks in all areas (priv level 100), create/manage player groups, chat, fly and set his own game mode (= allows fly and change of move speed). Can claim an area of up to 40 chunks.",
"PrivilegeLevel": 100,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"gamemode",
"freemove",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "LightGreen",
"LandClaimAllowance": 1310720,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 6,
"AutoGrant": false
},
{
"Code": "sumod",
"Name": "Survival Moderator",
"Description": "Can use/place/break blocks everywhere (priv level 200), create/manage player groups, chat, kick/ban players and do serverwide announcements. Can claim an area of up to 4 chunks.",
"PrivilegeLevel": 200,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"buildblockseverywhere",
"useblockseverywhere",
"kick",
"ban",
"announce",
"readlists",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "Cyan",
"LandClaimAllowance": 1310720,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 60,
"AutoGrant": false
},
{
"Code": "crmod",
"Name": "Creative Moderator",
"Description": "Can use/place/break blocks everywhere (priv level 500), create/manage player groups, chat, kick/ban players, fly and set his own or other players game modes (= allows fly and change of move speed). Can claim an area of up to 40 chunks.",
"PrivilegeLevel": 500,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"buildblockseverywhere",
"useblockseverywhere",
"kick",
"ban",
"gamemode",
"freemove",
"commandplayer",
"announce",
"readlists",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "Cyan",
"LandClaimAllowance": 1310720,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 60,
"AutoGrant": false
},
{
"Code": "admin",
"Name": "Admin",
"Description": "Has all privileges, including giving other players admin status.",
"PrivilegeLevel": 99999,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"build",
"useblock",
"buildblockseverywhere",
"useblockseverywhere",
"attackplayers",
"attackcreatures",
"freemove",
"gamemode",
"pickingrange",
"chat",
"kick",
"ban",
"whitelist",
"setwelcome",
"announce",
"readlists",
"give",
"areamodify",
"setspawn",
"controlserver",
"tp",
"time",
"grantrevoke",
"root",
"commandplayer",
"controlplayergroups",
"manageplayergroups",
"worldedit",
"denybreakreinforced"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "LightBlue",
"LandClaimAllowance": 2147483647,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 99999,
"AutoGrant": true
}
],
"DefaultRoleCode": "suplayer",
"AntiAbuse": 0,
"OnlyWhitelisted": false,
"VerifyPlayerAuth": true,
"DefaultSpawn": null,
"AllowPvP": false,
"AllowFireSpread": true,
"AllowFallingBlocks": true
}

347
serverconfig.json Normal file
View file

@ -0,0 +1,347 @@
{
"ConfigVersion": "1.3",
"ServerMonitor": true,
"MasterserverUrl": "http://masterserver.vintagestory.at/api/v1/servers/",
"ClientConnectionTimeout": 600,
"ClientPlayingTimeout": 60,
"BuildLogging": false,
"EntityDebugMode": false,
"MapSizeX": 1000000,
"MapSizeY": 256,
"MapSizeZ": 1000000,
"ServerLanguage": "de",
"SkipEveryChunkRow": 0,
"SkipEveryChunkRowWidth": 0,
"ModPaths": [
"Mods",
"/gamedata/vs/Mods"
],
"WorldConfig": {
"Seed": null,
"SaveFileLocation": "/gamedata/vs/Saves/default.vcdbs",
"WorldName": "VintageDockerExample",
"AllowCreativeMode": true,
"PlayStyle": "surviveandbuild",
"PlayStyleLangCode": "surviveandbuild-bands",
"WorldType": "standard",
"WorldConfiguration": null,
"MapSizeY": null,
"CreatedByPlayerName": null,
"DisabledMods": null
},
"NextPlayerGroupUid": 10,
"GroupChatHistorySize": 20,
"MaxOwnedGroupChannelsPerUser": 10,
"ServerName": "DE - VintageDockerExample",
"ServerUrl": null,
"ServerDescription": "VintageServer running in Docker container",
"WelcomeMessage": "Welcome {0}, may you survive well and prosper",
"Ip": null,
"Port": 42420,
"Upnp": false,
"CompressPackets": true,
"AdvertiseServer": true,
"MaxClients": 16,
"Password": "",
"MaxChunkRadius": 12,
"TickTime": 33.3333321,
"BlockTickChunkRange": 3,
"MaxMainThreadBlockTicks": 10000,
"RandomBlockTicksPerChunk": 16,
"BlockTickInterval": 300,
"Roles": [
{
"Code": "suvisitor",
"Name": "Survival Visitor",
"Description": "Can only visit this world and chat but not use/place/break anything",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"chat"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "Green",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "crvisitor",
"Name": "Creative Visitor",
"Description": "Can only visit this world, chat and fly but not use/place/break anything",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"chat"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "DarkGray",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "limitedsuplayer",
"Name": "Limited Survival Player",
"Description": "Can use/place/break blocks only in permitted areas (priv level -1), create/manage player groups and chat",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"build",
"useblock",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "White",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "limitedcrplayer",
"Name": "Limited Creative Player",
"Description": "Can use/place/break blocks in only in permitted areas (priv level -1), create/manage player groups, chat, fly and set his own game mode (= allows fly and change of move speed)",
"PrivilegeLevel": -1,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"build",
"useblock",
"gamemode",
"freemove",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "LightGreen",
"LandClaimAllowance": 0,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "suplayer",
"Name": "Survival Player",
"Description": "Can use/place/break blocks in unprotected areas (priv level 0), create/manage player groups and chat. Can claim an area of up to 8 chunks.",
"PrivilegeLevel": 0,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "White",
"LandClaimAllowance": 262144,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 3,
"AutoGrant": false
},
{
"Code": "crplayer",
"Name": "Creative Player",
"Description": "Can use/place/break blocks in all areas (priv level 100), create/manage player groups, chat, fly and set his own game mode (= allows fly and change of move speed). Can claim an area of up to 40 chunks.",
"PrivilegeLevel": 100,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"gamemode",
"freemove",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "LightGreen",
"LandClaimAllowance": 1310720,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 6,
"AutoGrant": false
},
{
"Code": "sumod",
"Name": "Survival Moderator",
"Description": "Can use/place/break blocks everywhere (priv level 200), create/manage player groups, chat, kick/ban players and do serverwide announcements. Can claim an area of up to 4 chunks.",
"PrivilegeLevel": 200,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"buildblockseverywhere",
"useblockseverywhere",
"kick",
"ban",
"announce",
"readlists",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "Cyan",
"LandClaimAllowance": 1310720,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 60,
"AutoGrant": false
},
{
"Code": "crmod",
"Name": "Creative Moderator",
"Description": "Can use/place/break blocks everywhere (priv level 500), create/manage player groups, chat, kick/ban players, fly and set his own or other players game modes (= allows fly and change of move speed). Can claim an area of up to 40 chunks.",
"PrivilegeLevel": 500,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"controlplayergroups",
"manageplayergroups",
"chat",
"areamodify",
"build",
"useblock",
"buildblockseverywhere",
"useblockseverywhere",
"kick",
"ban",
"gamemode",
"freemove",
"commandplayer",
"announce",
"readlists",
"attackcreatures",
"attackplayers"
],
"RuntimePrivileges": [],
"DefaultGameMode": 2,
"Color": "Cyan",
"LandClaimAllowance": 1310720,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 60,
"AutoGrant": false
},
{
"Code": "admin",
"Name": "Admin",
"Description": "Has all privileges, including giving other players admin status.",
"PrivilegeLevel": 99999,
"DefaultSpawn": null,
"ForcedSpawn": null,
"Privileges": [
"build",
"useblock",
"buildblockseverywhere",
"useblockseverywhere",
"attackplayers",
"attackcreatures",
"freemove",
"gamemode",
"pickingrange",
"chat",
"kick",
"ban",
"whitelist",
"setwelcome",
"announce",
"readlists",
"give",
"areamodify",
"setspawn",
"controlserver",
"tp",
"time",
"grantrevoke",
"root",
"commandplayer",
"controlplayergroups",
"manageplayergroups",
"worldedit",
"denybreakreinforced"
],
"RuntimePrivileges": [],
"DefaultGameMode": 1,
"Color": "LightBlue",
"LandClaimAllowance": 2147483647,
"LandClaimMinSize": {
"X": 5,
"Y": 5,
"Z": 5
},
"LandClaimMaxAreas": 99999,
"AutoGrant": true
}
],
"DefaultRoleCode": "suplayer",
"AntiAbuse": 0,
"OnlyWhitelisted": false,
"VerifyPlayerAuth": true,
"DefaultSpawn": null,
"AllowPvP": false,
"AllowFireSpread": true,
"AllowFallingBlocks": true
}