moved port/env to composer for custom build

This commit is contained in:
Maik Laschober 2020-08-18 08:20:45 +02:00
parent 8065eab0c0
commit 7c3b4c2392
3 changed files with 8 additions and 14 deletions

View file

@ -5,8 +5,8 @@ To run this image you can use `docker run -pd 42420:42420 --name VintageStorySer
You can either copy files from `https://github.com/Devidian/docker-vintagestory/tree/master/build-custom-example` or follow these steps:
- create a `serverconfig.json` with your settings
- create a `Dockerfile` file with contents found below (maybe adjust port)
- create a `docker-compose.yml` file with contents found below
- create a `Dockerfile` file with contents found below
- create a `docker-compose.yml` file with contents found below (adjust port/path if you need)
- run `docker-compose up -d` to start
- run `docker-compose up -d --build` to rebuild and restart
- run `docker-compose down` to stop
@ -19,14 +19,9 @@ FROM devidian/vintagestory:latest as runtime
WORKDIR /game
ENV VSDATAPATH vs-custom
# update with your own serverconfig
COPY "./serverconfig.json" "/gamedata/${VSDATAPATH}/serverconfig.json"
# Expose ports
EXPOSE 42420/tcp
# CMD [ "mono" , "VintagestoryServer.exe", "--dataPath", "/gamedata/${VSDATAPATH}" ]
CMD mono VintagestoryServer.exe --dataPath "/gamedata/${VSDATAPATH}"
@ -45,7 +40,9 @@ services:
volumes:
- gamedata:/gamedata
ports:
- "42420:42420"
- 42420:42420
environment:
VSDATAPATH: vs-custom
volumes:
gamedata:
```

View file

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

View file

@ -8,6 +8,8 @@ services:
volumes:
- gamedata:/gamedata
ports:
- "42420:42420"
- 42420:42420
environment:
VSDATAPATH: vs-custom
volumes:
gamedata: