diff --git a/Dockerfile b/Dockerfile index e3f5804..3bc9da3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,16 +13,16 @@ RUN rm "vs_server_${vs_version}.tar.gz" # ============== runtime stage ================== FROM mono:latest as runtime -WORKDIR /game +COPY --from=downloader "./download/" "/game" +# Defaults ARG vs_data_path=/gamedata/vs -COPY --from=downloader "./download/" "/game" COPY "./serverconfig.json" "${vs_data_path}/serverconfig.json" - # Expose ports EXPOSE 42420/tcp +WORKDIR /game # Execution command -CMD mono VintagestoryServer.exe --dataPath ${vs_data_path} +CMD mono VintagestoryServer.exe --dataPath ${VS_DATA_PATH} diff --git a/build-custom-example/Dockerfile b/build-custom-example/Dockerfile index 54e2788..7210622 100644 --- a/build-custom-example/Dockerfile +++ b/build-custom-example/Dockerfile @@ -1,7 +1,7 @@ # ============== runtime stage ================== FROM devidian/vintagestory:latest as runtime -ARG vs_data_path=/gamedata/vs +ARG vs_data_path=/gamedata/vs-custom # update with your own serverconfig COPY serverconfig.json ${vs_data_path}/serverconfig.json @@ -12,4 +12,4 @@ COPY Playerdata ${vs_data_path}/Playerdata/ WORKDIR /game -CMD mono VintagestoryServer.exe --dataPath ${vs_data_path} +CMD mono VintagestoryServer.exe --dataPath ${VS_DATA_PATH} diff --git a/build-custom-example/docker-compose.yml b/build-custom-example/docker-compose.yml index eeefcbc..bf35cf0 100644 --- a/build-custom-example/docker-compose.yml +++ b/build-custom-example/docker-compose.yml @@ -5,13 +5,14 @@ services: build: context: . args: - vs_data_path: /gamedata/vs-mods/ + vs_data_path: /gamedata/vs-custom/ container_name: vsserver restart: always volumes: - gamedata:/gamedata ports: - 42420:42420 - + environment: + VS_DATA_PATH: /gamedata/vs-custom volumes: gamedata: \ No newline at end of file