Moved all config to .env file; updated README
parent
3e0e544ec7
commit
0ae84c0019
17
README.md
17
README.md
|
@ -14,13 +14,28 @@ The repo contains setup guides for the following:
|
||||||
Each directory contains (or will contain) its own `README.md` to aid with the
|
Each directory contains (or will contain) its own `README.md` to aid with the
|
||||||
installation of that specific setup.
|
installation of that specific setup.
|
||||||
|
|
||||||
# Docker
|
# General info
|
||||||
|
This info applies to all configs.
|
||||||
|
|
||||||
|
## Docker
|
||||||
All the setups named above use Docker and docker-compose. If you're on a
|
All the setups named above use Docker and docker-compose. If you're on a
|
||||||
Linux-based server, you can find both `docker` and `docker-compose` in your
|
Linux-based server, you can find both `docker` and `docker-compose` in your
|
||||||
package manager (do note that the Docker package might be called `docker.io`).
|
package manager (do note that the Docker package might be called `docker.io`).
|
||||||
Otherwise, the install instructions can be found
|
Otherwise, the install instructions can be found
|
||||||
[here](https://docs.docker.com/engine/install/).
|
[here](https://docs.docker.com/engine/install/).
|
||||||
|
|
||||||
|
## Building the image
|
||||||
|
You can build the container image using the command `docker-compose build`.
|
||||||
|
This will build all services specified in the `docker-compose.yml` file. Any
|
||||||
|
build configuration/environment variables can be defined in a `.env` file. A
|
||||||
|
`.env.example` file is given for each configuration.
|
||||||
|
|
||||||
|
## Running the container
|
||||||
|
For running the server, we can use `docker-compose up -d`. This will start the
|
||||||
|
service in the background. You can then see any logs using
|
||||||
|
`docker-compose logs`. If you want the logs to update automatically, use
|
||||||
|
`docker-compose logs -f`.
|
||||||
|
|
||||||
# Why did I make this?
|
# Why did I make this?
|
||||||
Well, I just wanted to put all my knowledge in one basket. this makes it easier
|
Well, I just wanted to put all my knowledge in one basket. this makes it easier
|
||||||
to manage and share with others. I spend a lot of time tweaking these configs
|
to manage and share with others. I spend a lot of time tweaking these configs
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
# Build arguments
|
||||||
FABRIC_VERSION=
|
FABRIC_VERSION=
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
XMS=4
|
XMS=4
|
||||||
XMX=4
|
XMX=4
|
||||||
|
|
||||||
|
# Mountpoints
|
||||||
|
CONFIG_DIR=
|
||||||
|
MODS_DIR=
|
||||||
|
WORLDS_DIR=
|
||||||
|
|
||||||
|
# Other
|
||||||
|
PORT=25565
|
||||||
|
|
|
@ -15,8 +15,8 @@ services:
|
||||||
- XMS
|
- XMS
|
||||||
- XMX
|
- XMX
|
||||||
ports:
|
ports:
|
||||||
- '25565:25565'
|
- '$PORT:25565'
|
||||||
volumes:
|
volumes:
|
||||||
- '/data/mc/fabric/config:/mc/config'
|
- '$CONFIG_DIR:/mc/config'
|
||||||
- '/data/mc/fabric/mods:/mc/config/mods'
|
- '$MODS_DIR:/mc/config/mods'
|
||||||
- '/data/mc/fabric/worlds:/mc/worlds'
|
- '$WORLDS_DIR:/mc/worlds'
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
|
# Build arguments
|
||||||
MC_VERSION=
|
MC_VERSION=
|
||||||
FORGE_VERSION=
|
FORGE_VERSION=
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
XMS=4
|
XMS=4
|
||||||
XMX=4
|
XMX=4
|
||||||
|
|
||||||
|
# Mountpoints
|
||||||
|
CONFIG_DIR=
|
||||||
|
MODS_DIR=
|
||||||
|
WORLDS_DIR=
|
||||||
|
|
||||||
|
# Other
|
||||||
|
PORT=25565
|
||||||
|
|
|
@ -11,11 +11,13 @@ RUN mkdir worlds config
|
||||||
# Download installer jar
|
# Download installer jar
|
||||||
ADD "https://files.minecraftforge.net/maven/net/minecraftforge/forge/${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-installer.jar" installer.jar
|
ADD "https://files.minecraftforge.net/maven/net/minecraftforge/forge/${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-installer.jar" installer.jar
|
||||||
|
|
||||||
# Install forge, rename forge jar & remove installer
|
# Install forge & remove installer
|
||||||
RUN java -jar installer.jar server --installServer && \
|
RUN java -jar installer.jar server --installServer && \
|
||||||
mv forge-${MC_VERSION}-${FORGE_VERSION}.jar forge.jar && \
|
|
||||||
rm installer.jar installer.jar.log
|
rm installer.jar installer.jar.log
|
||||||
|
|
||||||
|
# Forge doesn't use one single name, so this is needed to know the name of the executable
|
||||||
|
ENV FORGE_JAR="forge-${MC_VERSION}-${FORGE_VERSION}.jar"
|
||||||
|
|
||||||
# Store the cache in an anonymous volume, which means it won't get stored in the other volumes
|
# Store the cache in an anonymous volume, which means it won't get stored in the other volumes
|
||||||
VOLUME /mc/config/cache
|
VOLUME /mc/config/cache
|
||||||
|
|
||||||
|
@ -50,6 +52,6 @@ java \
|
||||||
-XX:MaxTenuringThreshold=1 \
|
-XX:MaxTenuringThreshold=1 \
|
||||||
-Dusing.aikars.flags=https://mcflags.emc.gs \
|
-Dusing.aikars.flags=https://mcflags.emc.gs \
|
||||||
-Daikars.new.flags=true \
|
-Daikars.new.flags=true \
|
||||||
-jar forge.jar \
|
-jar "$FORGE_JAR" \
|
||||||
--universe /mc/worlds \
|
--universe /mc/worlds \
|
||||||
--nogui
|
--nogui
|
||||||
|
|
|
@ -16,8 +16,8 @@ services:
|
||||||
- XMS
|
- XMS
|
||||||
- XMX
|
- XMX
|
||||||
ports:
|
ports:
|
||||||
- '25565:25565'
|
- '$PORT:25565'
|
||||||
volumes:
|
volumes:
|
||||||
- '/data/mc/forge/config:/mc/config'
|
- '$CONFIG_DIR:/mc/config'
|
||||||
- '/data/mc/forge/mods:/mc/config/mods'
|
- '$MODS_DIR:/mc/config/mods'
|
||||||
- '/data/mc/forge/worlds:/mc/worlds'
|
- '$WORLDS_DIR:/mc/worlds'
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
|
# Build arguments
|
||||||
MC_VERSION=
|
MC_VERSION=
|
||||||
PAPERMC_VERSION=
|
PAPERMC_VERSION=
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
XMS=4
|
XMS=4
|
||||||
XMX=4
|
XMX=4
|
||||||
|
|
||||||
|
# Mountpoints
|
||||||
|
CONFIG_DIR=
|
||||||
|
WORLDS_DIR=
|
||||||
|
|
||||||
|
# Other
|
||||||
|
PORT=25565
|
||||||
|
|
|
@ -17,7 +17,7 @@ services:
|
||||||
- XMS
|
- XMS
|
||||||
- XMX
|
- XMX
|
||||||
ports:
|
ports:
|
||||||
- '25565:25565'
|
- '$PORT:25565'
|
||||||
volumes:
|
volumes:
|
||||||
- '/data/mc/papermc/worlds:/minecraft/worlds'
|
- '$CONFIG_DIR:/minecraft/config'
|
||||||
- '/data/mc/papermc/config:/minecraft/config'
|
- '$WORLDS_DIR:/minecraft/worlds'
|
||||||
|
|
|
@ -1,2 +1,13 @@
|
||||||
|
# Build arguments
|
||||||
RELEASE_TAG=
|
RELEASE_TAG=
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
AUTOCREATE=2
|
AUTOCREATE=2
|
||||||
|
|
||||||
|
# Mountpoints
|
||||||
|
CONFIG_DIR=
|
||||||
|
LOGS_DIR=
|
||||||
|
WORLDS_DIR=
|
||||||
|
|
||||||
|
# Other
|
||||||
|
PORT=7777
|
||||||
|
|
|
@ -14,8 +14,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- AUTOCREATE
|
- AUTOCREATE
|
||||||
ports:
|
ports:
|
||||||
- '7777:7777'
|
- '$PORT:7777'
|
||||||
volumes:
|
volumes:
|
||||||
- '/data/tshock/config:/terraria/config'
|
- '$CONFIG_DIR:/terraria/config'
|
||||||
- '/data/tshock/logs:/terraria/logs'
|
- '$LOGS_DIR:/terraria/logs'
|
||||||
- '/data/tshock/worlds:/terraria/worlds'
|
- '$WORLDS_DIR:/terraria/worlds'
|
||||||
|
|
Reference in New Issue