44 lines
1.2 KiB
YAML
Executable File
44 lines
1.2 KiB
YAML
Executable File
# {{ ansible_managed }}
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
# Gluetun is used to connect container to VPN
|
|
mc-gluetun:
|
|
image: qmcgaw/gluetun
|
|
cap_add:
|
|
- NET_ADMIN
|
|
environment:
|
|
- VPN_SERVICE_PROVIDER=custom
|
|
- VPN_TYPE=wireguard
|
|
- VPN_ENDPOINT_IP={{ proxy_server_ip }}
|
|
- VPN_ENDPOINT_PORT={{ proxy_server_vpn_port }}
|
|
- WIREGUARD_PUBLIC_KEY={{ vpn_server_pubkey }}
|
|
- WIREGUARD_PRIVATE_KEY={{ minecraft_service_privkey }}
|
|
- WIREGUARD_ADDRESSES=10.0.0.7/32
|
|
- FIREWALL_VPN_INPUT_PORTS=25565
|
|
ports:
|
|
- "54376:54376"
|
|
volumes:
|
|
# Custom IPTables forwarding rules to forward TCP(web) traffic from port 54376 to port 25565
|
|
- ./post-rules.txt:/iptables/post-rules.txt
|
|
|
|
mc:
|
|
image: itzg/minecraft-server
|
|
tty: true
|
|
stdin_open: true
|
|
environment:
|
|
UID: "1006" # spool1_minecraft user
|
|
GID: "1007" # spool1_minecraft group
|
|
EULA: "TRUE"
|
|
MEMORY: "1G"
|
|
INIT_MEMORY: "1G"
|
|
MAX_MEMORY: "1G"
|
|
ENABLE_ROLLING_LOGS: true
|
|
volumes:
|
|
# attach the relative directory 'data' to the container's /data path
|
|
# - ./data:/data
|
|
#
|
|
- ./data:/data
|