This may or may not work
This commit is contained in:
parent
bfe0ceabbf
commit
6f481d441b
3 changed files with 9 additions and 6 deletions
2
.env
Normal file
2
.env
Normal file
|
@ -0,0 +1,2 @@
|
|||
SERVICE_NAME=mcsd
|
||||
NETWORK_NAME=mcsdnet
|
|
@ -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
|
||||
|
|
3
rcon.sh
3
rcon.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue