mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-18 05:03:17 +00:00
Lazymc - Update misc examples with non-deprecated method of managing lazymc (#3360)
This commit is contained in:
+34
-8
@@ -31,15 +31,33 @@ services:
|
|||||||
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
|
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# Lazymc requires that the minecraft server have a static IP.
|
||||||
|
#
|
||||||
|
# To ensure that our servers have a static IP we need to create
|
||||||
|
# a network for our services to use.
|
||||||
|
#
|
||||||
|
# By default, Docker uses 172.17.0.0/16 subnet range.
|
||||||
|
# So we need to create a new network in a different subnet
|
||||||
|
# See the readme for more information.
|
||||||
|
#
|
||||||
|
# Please ensure that the subnet falls within the private CIDRs:
|
||||||
|
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
|
||||||
|
#
|
||||||
|
# And that it is not in use by anything else.
|
||||||
|
networks:
|
||||||
|
minecraft-network:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.18.0.0/16
|
||||||
|
|
||||||
services:
|
services:
|
||||||
lazymc:
|
lazymc:
|
||||||
container_name: lazymc
|
|
||||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||||
environment:
|
# the IPs should start at .2 as .1 is reserved for the gateway
|
||||||
# Point to the service name of the Minecraft server
|
networks:
|
||||||
SERVER_ADDRESS: mc:25565
|
minecraft-network:
|
||||||
# Required to find the container to manage it
|
ipv4_address: 172.18.0.2
|
||||||
LAZYMC_GROUP: mc
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
# you should mount the minecraft server dir under /server, using read only.
|
# you should mount the minecraft server dir under /server, using read only.
|
||||||
@@ -54,11 +72,19 @@ services:
|
|||||||
# Standard Docker Minecraft server, also works with other server types
|
# Standard Docker Minecraft server, also works with other server types
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java21
|
image: itzg/minecraft-server:java21
|
||||||
container_name: minecraft-server
|
# Assign a static IP to the server container
|
||||||
|
networks:
|
||||||
|
minecraft-network:
|
||||||
|
ipv4_address: 172.18.0.3
|
||||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||||
# container to manage
|
# container to manage
|
||||||
labels:
|
labels:
|
||||||
|
# Set lazymc.enabled to true to enable lazymc on this container
|
||||||
|
- lazymc.enabled=true
|
||||||
|
# Required to find the container to manage it
|
||||||
- lazymc.group=mc
|
- lazymc.group=mc
|
||||||
|
# Point to the service name of the Minecraft server
|
||||||
|
- lazymc.server.address=mc:25565
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
# This container should be managed solely by the lazymc container
|
# This container should be managed solely by the lazymc container
|
||||||
@@ -113,4 +139,4 @@ services:
|
|||||||
stdin_open: true
|
stdin_open: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
|
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/lazytainer/docker-compose.yml)
|
||||||
|
|||||||
@@ -1,12 +1,30 @@
|
|||||||
|
# Lazymc requires that the minecraft server have a static IP.
|
||||||
|
#
|
||||||
|
# To ensure that our servers have a static IP we need to create
|
||||||
|
# a network for our services to use.
|
||||||
|
#
|
||||||
|
# By default, Docker uses 172.17.0.0/16 subnet range.
|
||||||
|
# So we need to create a new network in a different subnet
|
||||||
|
# See the readme for more information.
|
||||||
|
#
|
||||||
|
# Please ensure that the subnet falls within the private CIDRs:
|
||||||
|
# https://datatracker.ietf.org/doc/html/rfc1918#section-3
|
||||||
|
#
|
||||||
|
# And that it is not in use by anything else.
|
||||||
|
networks:
|
||||||
|
minecraft-network:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.18.0.0/16
|
||||||
|
|
||||||
services:
|
services:
|
||||||
lazymc:
|
lazymc:
|
||||||
container_name: lazymc
|
|
||||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||||
environment:
|
# the IPs should start at .2 as .1 is reserved for the gateway
|
||||||
# Point to the service name of the Minecraft server
|
networks:
|
||||||
SERVER_ADDRESS: mc:25565
|
minecraft-network:
|
||||||
# Required to find the container to manage it
|
ipv4_address: 172.18.0.2
|
||||||
LAZYMC_GROUP: mc
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
# you should mount the minecraft server dir under /server, using read only.
|
# you should mount the minecraft server dir under /server, using read only.
|
||||||
@@ -21,11 +39,19 @@ services:
|
|||||||
# Standard Docker Minecraft server, also works with other server types
|
# Standard Docker Minecraft server, also works with other server types
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java21
|
image: itzg/minecraft-server:java21
|
||||||
container_name: minecraft-server
|
# Assign a static IP to the server container
|
||||||
|
networks:
|
||||||
|
minecraft-network:
|
||||||
|
ipv4_address: 172.18.0.3
|
||||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||||
# container to manage
|
# container to manage
|
||||||
labels:
|
labels:
|
||||||
|
# Set lazymc.enabled to true to enable lazymc on this container
|
||||||
|
- lazymc.enabled=true
|
||||||
|
# Required to find the container to manage it
|
||||||
- lazymc.group=mc
|
- lazymc.group=mc
|
||||||
|
# Point to the service name of the Minecraft server
|
||||||
|
- lazymc.server.address=mc:25565
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
# This container should be managed solely by the lazymc container
|
# This container should be managed solely by the lazymc container
|
||||||
|
|||||||
Reference in New Issue
Block a user