Move environment variables into config.env
This commit is contained in:
parent
046167b211
commit
9033261280
3 changed files with 33 additions and 9 deletions
|
@ -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.
|
||||
|
|
28
config.example
Normal file
28
config.example
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue