-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (87 loc) · 3.73 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: '3'
volumes:
mineos:
driver: local
driver_opts:
type: nfs
#
# Modify this to suit your environment.
# If you plan to use a local folder insead of an NFS share, remove
# this first 'volumes' section and modify 'mineos' in the second
# 'volumes' block to point to your local folder.
#
o: "addr=172.16.0.60,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=14,nfsvers=4"
device: ":/mnt/Volume_1/Apps/mineos_hyperion"
services:
mineos:
image: hexparrot/mineos:latest
container_name: mineos_server
networks:
# If you're not planning to fix the server's IP, comment out the next
# 2 lines...
proxy:
ipv4_address: ${MINEOS_IP}
# ...and uncomment the next line:
# - proxy
restart: unless-stopped
# Adjust as needed; if this is too short, stopping the container
# may corrupt map data
stop_grace_period: 10m
volumes:
# Using a bind mapping is preferrable here due to how docker
# stores names volumes by default in /var/lib/docker/volumes
# with permissions that prevent normal users from accessing
# the folder structure.
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
# Edit 'mineos' in the next line if you plan to use a local folder
# do not change the part after the ':'
- mineos:/var/games/minecraft
environment:
# Should the web interface use HTTPS or HTTP?
# Valid entries are "true" and "false" (with quotes)
USE_HTTPS: "true"
# What port should the web interface listen on?
# This is independant of the USE_HTTPS setting.
SERVER_PORT: 8443
# On startup, mineos will check if an account of this name exists.
# If it does not exist, one will be created. This account, and
# any other created with this variable will be permitted to login
# to the web interface.
USER_NAME: ${USER_NAME}
# If the account listed above does not already exist, when mineos
# creates it, it will do so with UID. If an account with this UID
# already exists, account creation will be aborted.
USER_UID: ${USER_UID}
# If the account is being created, it will use either the password
# set below, or a random, 20 character password will generated for
# you and displayed in the console log. After first launch, you
# should check the log.
USER_PASSWORD: ${USER_PASSWORD}
labels:
- "traefik.enable=true"
- "traefik.http.routers.mineos.service=mineos"
- "traefik.http.routers.mineos.entrypoints=http"
- "traefik.http.routers.mineos.rule=Host(`mineos.${DOMAINNAME}`)"
- "traefik.http.routers.mineos.middlewares=mineos-https-redirect"
- "traefik.http.middlewares.mineos-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.mineos-secure.entrypoints=https"
- "traefik.http.routers.mineos-secure.rule=Host(`mineos.${DOMAINNAME}`)"
- "traefik.http.routers.mineos-secure.tls=true"
- "traefik.http.routers.mineos-secure.service=mineos"
- "traefik.http.services.mineos.loadbalancer.server.scheme=https"
- "traefik.http.services.mineos.loadbalancer.server.port=8443"
- "traefik.docker.network=proxy"
ports:
# HTTPS port for web interface. If you change the SERVER_PORT
# variable, also change this mapping.
- "8443:8443/tcp"
# Minecraft server ports. 25565 is the default, but is you plan
# on running multiple servers at the same time, each will need
# a unique port unless you are using bungiecord.
# Expand this range as needed.
- "25565-25570:25565-25570/tcp"
- "25565-25570:25565-25570/udp"
networks:
proxy:
external: true