Add mc FRP

This commit is contained in:
ChenKaiLiuG
2026-03-28 22:05:27 +08:00
parent 555e5e70f1
commit d7bf9c2e85
3 changed files with 141 additions and 41 deletions

View File

@@ -10,6 +10,9 @@ services:
- TZ=Asia/Taipei
ports:
- "8000:8443" # 管理介面
- "1110:1110"
- "1120:1120"
- "11100:11100"
volumes:
- /docker/minecraft/crafty/backups:/crafty/backups
- /docker/minecraft/crafty/logs:/crafty/logs
@@ -78,7 +81,7 @@ services:
- DOZZLE_TAILSIZE=500 # 日誌顯示行數
- DOZZLE_FILTER=name=crafty*|name=minecraft* # 只顯示 MC 相關容器
ports:
- "8020:8080" # 訪問即可看到所有容器日誌
- "8020:8080" # 訪問 http://localhost:8020 即可看到所有容器日誌
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
@@ -88,39 +91,17 @@ services:
limits:
memory: 256M
# 4. GoEdge 管理後台 + API 節點 + MySQL
# 官方建議使用 goedgelabs/goedge-admin 映像,內建 MariaDB
goedge-admin:
image: goedgelabs/goedge-admin:latest
container_name: goedge_admin
restart: unless-stopped
environment:
- TZ=Asia/Taipei
volumes:
- goedge_admin_mysql:/var/lib/mysql # MySQL 資料庫
- goedge_admin_data:/usr/local/goedge/edge-admin # Admin 設定 + 日誌 + API 設定
ports:
- "8030:7788" # 管理後台登入端口 (預設 admin/123456)
networks:
- minecraft_net
# 5. GoEdge 邊緣節點 (實際負責轉發的 Proxy)
goedge-node:
image: goedgelabs/goedge-node:latest
container_name: goedge_node
restart: unless-stopped
environment:
- TZ=Asia/Taipei
volumes:
- goedge_node_data:/usr/local/goedge/edge-node
ports:
- "1110-1200:1110-1200" # 預留 1110 到 1200 之間的 90 個端口
networks:
- minecraft_net
depends_on:
- goedge-admin
# 6. 備份服務 (可選) - 自動備份到雲端或其他位置
# 4. FRP 客戶端 (負責打通內網)
# frpc:
# image: snowdreamtech/frpc:latest
# container_name: frpc_tunnel
# restart: unless-stopped
# 使用 host 模式,讓 frpc 能直接抓到 Crafty 開出的所有子伺服器 port
# network_mode: "host"
# volumes:
# - /docker/minecraft/frpc/frpc.toml:/etc/frp/frpc.toml
# 5. 備份服務 (可選) - 自動備份到雲端或其他位置
# duplicati:
# image: lscr.io/linuxserver/duplicati:latest
# container_name: minecraft_backup
@@ -138,7 +119,7 @@ services:
# networks:
# - minecraft_net
# 7. Watchtower - 自動更新容器映像檔(可選)
# 6. Watchtower - 自動更新容器映像檔(可選)
# watchtower:
# image: containrrr/watchtower:latest
# container_name: watchtower_minecraft
@@ -160,7 +141,4 @@ networks:
volumes:
netdataconfig:
netdatalib:
netdatacache:
goedge_admin_mysql: # MySQL 資料庫(單獨備份用)
goedge_admin_data: # Admin 所有資料(設定 + 日誌 + API
goedge_node_data: # Node 所有資料(設定 + 日誌)
netdatacache: