This may or may not work

This commit is contained in:
JeremyStar™ 2024-04-20 16:55:44 +02:00
parent bfe0ceabbf
commit 6f481d441b
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 9 additions and 6 deletions

2
.env Normal file
View file

@ -0,0 +1,2 @@
SERVICE_NAME=mcsd
NETWORK_NAME=mcsdnet

View file

@ -1,7 +1,7 @@
services:
mcsd:
${SERVICE_NAME}:
build: .
container_name: mcsd
container_name: ${SERVICE_NAME}
restart: unless-stopped
stop_grace_period: 120s
volumes:
@ -11,9 +11,9 @@ services:
ports:
- 25565:25565
networks:
- mcsdnet
- ${NETWORK_NAME}
networks:
mcsdnet:
name: mcsdnet
${NETWORK_NAME}:
name: ${NETWORK_NAME}
external: false

View file

@ -1,2 +1,3 @@
#!/bin/bash
docker compose exec -it mcsd rcon -a 127.0.0.1:25575 -p mcsdrcon
source .env
docker compose exec -it ${SERVICE_NAME} rcon -a 127.0.0.1:25575 -p mcsdrcon