3x-ui/docker-compose.yml
2026-01-18 21:33:06 +03:00

55 lines
No EOL
1.3 KiB
YAML

services:
3x-ui:
build:
context: .
args:
XRAY_VERSION: "${XRAY_VERSION:-v26.1.18}"
container_name: 3xui_app
volumes:
- $PWD/db/:/etc/x-ui/
- $PWD/cert/:/root/cert/
- $PWD/geodata/:/app/bin
environment:
TZ: "UTC"
XRAY_VMESS_AEAD_FORCED: "false"
XUI_ENABLE_FAIL2BAN: "true"
tty: true
network_mode: host
restart: unless-stopped
# If you don't need automatic geodata update, just disable `docker-proxy` and `geodata-cron` containers
docker-proxy:
image: tecnativa/docker-socket-proxy
container_name: docker_proxy
restart: unless-stopped
environment:
- CONTAINERS=1
- POST=1
- ALLOW_RESTARTS=1
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- docker-internal
geodata-cron:
build:
dockerfile: Dockerfile-cron-runner
container_name: geodata_cron
restart: unless-stopped
depends_on:
- docker-proxy
environment:
TZ: "UTC"
DOCKER_PROXY_URL: "http://docker-proxy:2375"
TARGET_CONTAINER_NAME: "3xui_app"
CRON_SCHEDULE: "*/5 * * * *" #"0 */6 * * *"
SHARED_VOLUME_PATH: "/app/bin"
volumes:
- $PWD/geodata/:/app/bin/
networks:
- docker-internal
networks:
docker-internal:
driver: bridge