mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
Add Tailscale docker-compose example (#2747)
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
This commit is contained in:
parent
46fb560ed9
commit
a46a506a1c
1 changed files with 36 additions and 0 deletions
36
examples/docker-compose-tailscale.yml
Normal file
36
examples/docker-compose-tailscale.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
version: "3"
|
||||
services:
|
||||
tailscale-client:
|
||||
image: tailscale/tailscale:latest
|
||||
container_name: tailscale
|
||||
hostname: tailscale-minecraft # This name will be the one on the tailscale network
|
||||
environment:
|
||||
TS_AUTHKEY: "tskey-auth-PLACE-YOUR-KEY-HERE"
|
||||
TS_STATE_DIR: "/var/lib/tailscale"
|
||||
TS_USERSPACE: "FALSE" # If not using Auto-pause it can be set as true
|
||||
volumes:
|
||||
- ./ts-minecraft/state:/var/lib/tailscale
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
cap_add:
|
||||
- net_admin
|
||||
- sys_module
|
||||
restart: unless-stopped
|
||||
# ports: # Not needed, tailscale is directly linking to the container.
|
||||
# - "25565:25565"
|
||||
minecraft-server:
|
||||
image: itzg/minecraft-server
|
||||
network_mode: container:tailscale
|
||||
stdin_open: true
|
||||
tty: true
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
# ENABLE_AUTOPAUSE: "TRUE"
|
||||
# AUTOPAUSE_KNOCK_INTERFACE: "tailscale0"
|
||||
# MAX_TICK_TIME: "-1"
|
||||
volumes:
|
||||
- minecraftserver:/data
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
volumes:
|
||||
minecraftserver:
|
Loading…
Reference in a new issue