diff --git a/Dockerfile b/Dockerfile index 8a83443..2e98252 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY src/ ./src/ COPY main.py ./ -COPY LICENSE.md ./ -COPY config.yaml ./ - # Buffer Python's stdout for debugging during runtime ENV PYTHONUNBUFFERED=1 diff --git a/README.md b/README.md index 603dd8c..760f7b7 100644 --- a/README.md +++ b/README.md @@ -6,25 +6,36 @@ This way, communication is enabled between a Minecraft server and a Matrix room. ## Setup -To create a Docker image, go to this folder and run the following command: +1. Create a Docker image using the following command: ``` docker build -t matrix-mc-server ./ ``` -Then, once a Docker image has been created, you can run the following command to run a Minecraft server. In `config.py`, you can find additional environment variables you can insert to alter settings on the Minecraft server. +2. Download the [latest Minecraft server jar file](https://www.minecraft.net/en-us/download/server). -``` -docker run --name mc-server \ --p 25565:25565 \ --v "":/usr/src/app/world \ --e EULA=true \ --e MATRIX_HOMESERVER='' \ --e MATRIX_USERNAME='' \ --e MATRIX_PASSWORD='' \ --e MC_CHANNEL='' \ --e SERVER_ADDRESS='' \ -mc-bridge -``` +3. Open `config.yaml` and adjust it to however you like. -This should successfully launch your bridged Minecraft server. +**NOTE:** Make sure to set EULA to `true` otherwise the server will refuse to start. + +4. Start the Docker container. You will need a few volumes: + +- `/usr/src/app/config.yaml` - Location of your custom `config.yaml` +- `/usr/src/app/whitelist.json` - Location of your whitelist, if any. +- `/usr/src/app/world/` - Folder of your custom Minecraft world to load +- `/usr/src/app/server.jar` - (Default) location of the server jar file. Can be changed in `config.yaml`. + +For example, your Docker compose file could look like the following: + +```docker-compose +version: '3' + +services: + matrix-mc-server: + image: matrix-mc-server:latest + volumes: + - :/usr/src/app/config.yaml + - :/usr/src/app/whitelist.json + - :/usr/src/app/world + - :/usr/src/app/server.jar +``` \ No newline at end of file