3x-ui/docker-compose.yml

70 lines
2.9 KiB
YAML
Raw Normal View History

2023-05-12 17:48:16 +00:00
---
services:
2024-11-18 10:39:36 +00:00
ui:
image: ghcr.io/serogaq/3x-ui:latest
2024-11-18 08:54:44 +00:00
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 256M
2023-05-12 17:48:16 +00:00
container_name: 3x-ui
2024-12-23 17:58:01 +00:00
hostname: ${HOSTNAME:-3x-ui}
2024-11-06 12:26:02 +00:00
networks:
traefik:
labels:
2024-11-18 10:39:36 +00:00
- "traefik.enable=true"
- "traefik.http.routers.3x-ui.rule=Host(`${XUI_PANEL_DOMAIN}`)"
2024-12-23 17:58:01 +00:00
- "traefik.http.routers.3x-ui.middlewares=cf-x-real-ip@file"
- "traefik.http.routers.3x-ui.entrypoints=websecure"
2024-11-18 10:39:36 +00:00
- "traefik.http.routers.3x-ui.service=3x-ui"
- "traefik.http.services.3x-ui.loadbalancer.server.port=2053"
2024-11-06 12:26:02 +00:00
#
2024-11-18 10:39:36 +00:00
- "traefik.http.routers.3x-ui-sub.rule=Host(`${XUI_SUB_DOMAIN}`)"
2024-12-23 17:58:01 +00:00
- "traefik.http.routers.3x-ui-sub.middlewares=cf-x-real-ip@file"
- "traefik.http.routers.3x-ui-sub.entrypoints=websecure"
2024-11-18 10:39:36 +00:00
- "traefik.http.routers.3x-ui-sub.service=3x-ui-sub"
- "traefik.http.services.3x-ui-sub.loadbalancer.server.port=2096"
2024-11-06 12:26:02 +00:00
#
2024-12-23 17:58:01 +00:00
- "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"
2024-12-23 17:58:01 +00:00
- "traefik.tcp.routers.vless-reality.entrypoints=websecure"
- "traefik.tcp.routers.vless-reality.service=3x-ui-inbound-443"
2024-11-18 10:39:36 +00:00
- "traefik.tcp.services.3x-ui-inbound-443.loadbalancer.server.port=443"
2024-12-23 17:58:01 +00:00
- "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"
2024-12-23 17:58:01 +00:00
- "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"
2024-12-23 17:58:01 +00:00
- "traefik.tcp.services.3x-ui-inbound-8888.loadbalancer.proxyprotocol.version=2"
2023-05-12 17:48:16 +00:00
volumes:
2024-12-06 20:27:12 +00:00
- ./db/:/etc/x-ui/
- ./db/fail2ban.sqlite3:/var/lib/fail2ban/fail2ban.sqlite3
- ./db/announce.txt:/etc/x-ui/announce.txt
2024-12-06 20:27:12 +00:00
- ./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
2023-05-12 17:48:16 +00:00
environment:
2024-11-06 12:26:02 +00:00
PUID: 1000
PGID: 1000
2023-05-12 17:48:16 +00:00
XRAY_VMESS_AEAD_FORCED: "false"
2024-11-06 12:26:02 +00:00
TZ: Europe/Moscow
2024-11-18 10:39:36 +00:00
XUI_SERVER_IP: "${XUI_SERVER_IP}"
2024-12-06 20:27:12 +00:00
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}"
2023-05-12 17:48:16 +00:00
tty: true
restart: unless-stopped
2024-11-06 12:26:02 +00:00
networks:
traefik:
external: true