forked from itzg/docker-minecraft-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (71 loc) · 1.65 KB
/
docker-compose.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
x-server: &server
env_file:
- .env
tty: true
stdin_open: true
environment: &env
LEVEL_TYPE: "minecraft:normal"
EULA: "true"
OPS: ${OPS_LIST}
DIFFICULTY: "normal"
MAX_PLAYERS: "3"
VIEW_DISTANCE: "6"
SIMULATION-DISTANCE: "6"
SPAWN_PROTECTION: "0"
PLAYER_IDLE_TIMEOUT: "10"
ENABLE_COMMAND_BLOCK: "false"
SNOOPER_ENABLED: "false"
# Autopause
ENABLE_AUTOPAUSE: "true"
AUTOPAUSE_TIMEOUT_INIT: "1800"
AUTOPAUSE_TIMEOUT_EST: "600"
AUTOPAUSE_PERIOD: "300"
# Specs
MAX_TICK_TIME: -1
INIT_MEMORY: ${INIT_MEMORY}
MAX_MEMORY: ${MAX_MEMORY}
# RCON
ENABLE_RCON: ${ENABLE_RCON}
RCON_PASSWORD: ${RCON_PASSWORD}
RCON_PORT: ${RCON_PORT}
# Debug
DEBUG_EXEC: "false"
DEBUG_AUTOPAUSE: "false"
DEBUG_MEMORY: "false"
# ENV settings
ENV_VARIABLE_PREFIX: ""
REPLACE_ENV_IN_PLACE: "true"
REPLACE_ENV_DURING_SYNC: "true"
OVERRIDE_SERVER_PROPERTIES: "true"
deploy:
resources:
limits:
cpus: ${CPUS}
ulimits:
nofile:
soft: 65536
hard: 65536
services:
minecraft:
<<: *server
container_name: ${SERVER_NAME}
image: itzg/minecraft-server${JAVA_VERSION}
restart: on-failure
env_file:
- .env
ports:
- ${PORT}:25565
- ${BEDROCK_PORT:+${BEDROCK_PORT}:19132/udp}
volumes:
- ${DATADIR}:/data
- ./downloads:/data/downloads
environment:
<<: *env
VERSION: ${VERSION}
SERVER_NAME: ${SERVER_NAME}
TYPE: ${TYPE}
volumes:
data:
driver: local
downloads:
driver: local