Add Docker example
parent
30f51d8d2b
commit
a06030332a
|
@ -0,0 +1,19 @@
|
||||||
|
FROM openjdk:slim
|
||||||
|
COPY --from=python:3 / /
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# Prepare Minecraft - Matrix bridge
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Prepare MC server
|
||||||
|
COPY server.jar ./
|
||||||
|
RUN java -jar server.jar --nogui
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Buffer Python's stdout for debugging during runtime
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
CMD ["python", "main.py", "java", "-Xmx1024M", "-Xms1024M", "-jar", "server.jar", "nogui"]
|
|
@ -0,0 +1,12 @@
|
||||||
|
sudo docker run \
|
||||||
|
-p 25565:25565 \
|
||||||
|
-v "<folder in which your store your Minecraft world>":/usr/src/app/world \
|
||||||
|
-e EULA=true \
|
||||||
|
-e WHITELIST=false \
|
||||||
|
-e VERIFY_ACCOUNTS=true \
|
||||||
|
-e MATRIX_HOMESERVER='<your matrix homeserver>' \
|
||||||
|
-e MATRIX_USERNAME='<matrix bridge client username>' \
|
||||||
|
-e MATRIX_PASSWORD='<matrix bridge client password>' \
|
||||||
|
-e MC_CHANNEL='<channel in which you communicate>' \
|
||||||
|
-e SERVER_ADDRESS='<ip address where players can connect to the server>' \
|
||||||
|
mc-bridge
|
Loading…
Reference in New Issue