mirror of
https://github.com/Merith-TK/docker-vintagestory
synced 2025-01-18 22:30:27 +00:00
moved custom docker README to main README
This commit is contained in:
parent
4301dc3e6c
commit
8065eab0c0
2 changed files with 51 additions and 16 deletions
51
README.md
51
README.md
|
@ -1,3 +1,54 @@
|
|||
# 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`
|
||||
|
||||
# Custom build
|
||||
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
|
||||
- run `docker-compose up -d` to start
|
||||
- run `docker-compose up -d --build` to rebuild and restart
|
||||
- run `docker-compose down` to stop
|
||||
|
||||
## Dockerfile for custom-build
|
||||
|
||||
```docker
|
||||
# ============== 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"
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 42420/tcp
|
||||
|
||||
# CMD [ "mono" , "VintagestoryServer.exe", "--dataPath", "/gamedata/${VSDATAPATH}" ]
|
||||
CMD mono VintagestoryServer.exe --dataPath "/gamedata/${VSDATAPATH}"
|
||||
|
||||
```
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yml
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
vsserver:
|
||||
build: .
|
||||
container_name: vsserver
|
||||
restart: always
|
||||
volumes:
|
||||
- gamedata:/gamedata
|
||||
ports:
|
||||
- "42420:42420"
|
||||
volumes:
|
||||
gamedata:
|
||||
```
|
||||
|
||||
# using unstable versions
|
||||
to use unstable versions just replace tag `latest` with `unstable` in `Dockerfile`
|
|
@ -1,16 +0,0 @@
|
|||
# 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.
|
||||
|
||||
```bash
|
||||
cd run;
|
||||
|
||||
#start
|
||||
docker-compose up -d
|
||||
#rebuild / update
|
||||
docker-compose up -d --build
|
||||
#stop
|
||||
docker-compose down
|
||||
```
|
Loading…
Reference in a new issue