Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
45 lines (44 loc) · 1.59 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
45 lines (44 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
services:
# I highly recommend using the itzg/minecraft-server image now that you're looking
# into running a Minecraft server service in Docker Compose. It pairs well with fmcmapper!
# Do read the documentation of that image here to get started:
# https://docker-minecraft-server.readthedocs.io/en/latest/
# Simple example:
mcserver:
image: itzg/minecraft-server
container_name: mcserver
restart: "unless-stopped"
ports:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: "VANILLA"
VERSION: "${MINECRAFT_VERSION:-LATEST}"
ENABLE_RCON: "true"
RCON_PASSWORD: "changeme"
RCON_PORT: "25575"
BROADCAST_RCON_TO_OPS: "false"
volumes:
- ./mcserver:/data
# Renders the world AND serves the map (built-in nginx) — one container, one
# port. RCON (25575) stays on the compose network, never published to the host.
fmcmapper:
# image: ghcr.io/freekbes/fmcmapper:latest
build: .
container_name: fmcmapper
restart: "unless-stopped"
ports:
- "8080:80" # the map (live players are proxied at /players on the same port)
environment:
RENDER_INTERVAL: "5" # minutes
# Optional live player tracking over RCON. Without these, it's disabled.
RCON_HOST: "mcserver"
RCON_PORT: "25575"
RCON_PASSWORD: "changeme" # must match mcserver's RCON_PASSWORD above
# PLAYERS_POLL_INTERVAL: "2" # seconds between polls (default 2)
volumes:
- ./mcserver/world:/app/world:ro
- ./mcserver/fmcmapper:/app/output
depends_on:
mcserver:
condition: service_healthy