3x-ui/docker-compose.yml
serogaq 314f40a546
Merge remote-tracking branch 'base/main' into v2.5.2
# Conflicts:
#	DockerInit.sh
#	Dockerfile
#	README.md
#	README.ru_RU.md
#	README.zh_CN.md
#	docker-compose.yml
#	go.mod
#	web/assets/js/model/setting.js
#	web/html/xui/xray.html
#	web/service/setting.go
2025-02-18 19:04:31 +01:00

71 lines
No EOL
3 KiB
YAML

---
services:
ui:
image: ghcr.io/serogaq/3x-ui:latest
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
container_name: 3x-ui
hostname: ${HOSTNAME:-3x-ui}
networks:
traefik:
labels:
- "traefik.enable=true"
- "traefik.http.routers.3x-ui.rule=Host(`${XUI_PANEL_DOMAIN}`)"
- "traefik.http.routers.3x-ui.middlewares=cf-x-real-ip@file"
- "traefik.http.routers.3x-ui.entrypoints=websecure"
- "traefik.http.routers.3x-ui.service=3x-ui"
- "traefik.http.services.3x-ui.loadbalancer.server.port=2053"
#
- "traefik.http.routers.3x-ui-sub.rule=Host(`${XUI_SUB_DOMAIN}`)"
- "traefik.http.routers.3x-ui-sub.middlewares=cf-x-real-ip@file"
- "traefik.http.routers.3x-ui-sub.entrypoints=websecure"
- "traefik.http.routers.3x-ui-sub.service=3x-ui-sub"
- "traefik.http.services.3x-ui-sub.loadbalancer.server.port=2096"
#
- "traefik.tcp.routers.vless-reality.rule=HostSNI(`${XUI_VLESS_REALITY_SNI}`) || HostSNI(`www.${XUI_VLESS_REALITY_SNI}`)"
- "traefik.tcp.routers.vless-reality.tls.passthrough=true"
- "traefik.tcp.routers.vless-reality.entrypoints=websecure"
- "traefik.tcp.routers.vless-reality.service=3x-ui-inbound-443"
- "traefik.tcp.services.3x-ui-inbound-443.loadbalancer.server.port=443"
- "traefik.tcp.services.3x-ui-inbound-443.loadbalancer.proxyprotocol.version=2"
#
- "traefik.tcp.routers.vless-grpc.rule=HostSNI(`${XUI_VLESS_GRPC_SNI}`)"
- "traefik.tcp.routers.vless-grpc.tls.passthrough=true"
- "traefik.tcp.routers.vless-grpc.entrypoints=websecure"
- "traefik.tcp.routers.vless-grpc.service=3x-ui-inbound-8888"
- "traefik.tcp.services.3x-ui-inbound-8888.loadbalancer.server.port=8888"
- "traefik.tcp.services.3x-ui-inbound-8888.loadbalancer.proxyprotocol.version=2"
volumes:
- ./db/:/etc/x-ui/
- ./db/fail2ban.sqlite3:/var/lib/fail2ban/fail2ban.sqlite3
- ./db/announce.txt:/etc/x-ui/announce.txt
- ./cert/:/root/cert/
- ./logs/xray-access.log:/app/access.log
- ./logs/xray-error.log:/app/error.log
- ./logs/3xipl.log:/var/log/3xipl.log
- ./logs/3xipl-ap.log:/var/log/3xipl-ap.log
- ./logs/3xipl-banned.log:/var/log/3xipl-banned.log
- ./logs/fail2ban.log:/var/log/fail2ban.log
environment:
PUID: 1000
PGID: 1000
TZ: Europe/Moscow
XRAY_VMESS_AEAD_FORCED: "false"
X_UI_ENABLE_FAIL2BAN: "${X_UI_ENABLE_FAIL2BAN:-false}"
XUI_SERVER_IP: "${XUI_SERVER_IP}"
XUI_SUB_PROFILE_TITLE: "${XUI_SUB_PROFILE_TITLE:-}"
XUI_SUB_SUPPORT_URL: "${XUI_SUB_SUPPORT_URL:-}"
XUI_SUB_PROFILE_WEB_PAGE_URL: "${XUI_SUB_PROFILE_WEB_PAGE_URL:-}"
XUI_GETREMOTEIP_PRIORITY_HEADER: "${XUI_GETREMOTEIP_PRIORITY_HEADER:-}"
XUI_DEBUG: "${XUI_DEBUG:-false}"
XUI_LOG_LEVEL: "${XUI_LOG_LEVEL:-info}"
tty: true
restart: unless-stopped
networks:
traefik:
external: true