diff --git a/README.md b/README.md index f4a8255..a50f918 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,13 @@ This will bootstrap MCSD. git clone "https://git.staropensource.de/JeremyStarTM/mcserverdocker.git" cd mcserverdocker mkdir server +cp config.example.env config.env ``` ## Step 2: Installing the server software Rename the jar file of your preferred server software to `server.jar` and move it into the `server/` directory. -## Step 3: Modify the docker-compose.yml -Take a look at the ports and environment variables inside the `docker-compose.yml` file and leave everything else as-is. +## Step 3: Modify the configuration +Take a look at the environment variables inside the `config.env` file. ## Step 4: Launching the server You need to start your server two times as we need to generate the `server.properties` file first. MCSD will do this automatically for you. diff --git a/config.example b/config.example new file mode 100644 index 0000000..dae7ca5 --- /dev/null +++ b/config.example @@ -0,0 +1,28 @@ +# MCServerDocker configuration file + +# ENFORCE_FRESH_CACHES +## Cleans all caches on startup, useful if you experience issues. +MCSD_ENFORCE_FRESH_CACHES=false + +# FORCE_UPGRADE +## Updates all chunks to the latest version on startup, if possible. Will slow down startup time (if you switch versions) but will significantly increase server performance during runtime. +MCSD_FORCE_UPGRADE=true + +# SAFEMODE +# Disables all datapacks +MCSD_SAFEMODE=false + +# AUTO_RESTART +## Restarts the server automatically if it exits +MCSD_AUTO_RESTART=true + +# CLEAN_LOGS +# Removes all log files on startup (restarts are not affected) +MCSD_CLEAN_LOGS=true + +# JAVA_VERSION +## Minecraft version | Java version +## <= 1.16 | 8 +## <= 1.16 | 11 (may increase performance) +## >= 1.17 | 17 +MCSD_JAVA_VERSION=17 diff --git a/docker-compose.yml b/docker-compose.yml index 4a23797..0c54f82 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,12 +8,7 @@ services: stop_grace_period: 120s volumes: - ./server:/data - environment: - - MCSD_ENFORCE_FRESH_CACHES=false # cleans all caches on startup, useful if you experience issues - - MCSD_FORCE_UPGRADE=true # updates all chunks to the latest version, if possible. will slow down startup time on upgrade but will significantly increase server performance during runtime - - MCSD_SAFEMODE=false # disables all datapacks - - MCSD_AUTO_RESTART=true # restarts the server automatically if it exists - - MCSD_CLEAN_LOGS=true # removes all log files on startup (restarts are not affected) - - MCSD_JAVA_VERSION=17 # available arw: 17, 11 and 8 + env_file: + - ./config.env ports: - 25565:25565