2023-05-12 17:48:16 +00:00
|
|
|
services:
|
2025-06-13 08:25:13 +00:00
|
|
|
3xui:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: ./Dockerfile
|
|
|
|
|
container_name: 3xui_app
|
|
|
|
|
# hostname: yourhostname <- optional
|
2023-05-12 17:48:16 +00:00
|
|
|
volumes:
|
|
|
|
|
- $PWD/db/:/etc/x-ui/
|
|
|
|
|
- $PWD/cert/:/root/cert/
|
|
|
|
|
environment:
|
|
|
|
|
XRAY_VMESS_AEAD_FORCED: "false"
|
2025-05-22 06:21:23 +00:00
|
|
|
XUI_ENABLE_FAIL2BAN: "true"
|
2026-05-18 12:43:59 +00:00
|
|
|
# To use PostgreSQL instead of the default SQLite, run:
|
|
|
|
|
# docker compose --profile postgres up -d
|
|
|
|
|
# and uncomment the two lines below.
|
|
|
|
|
# XUI_DB_TYPE: "postgres"
|
|
|
|
|
# XUI_DB_DSN: "postgres://xui:xui@postgres:5432/xui?sslmode=disable"
|
2023-05-12 17:48:16 +00:00
|
|
|
tty: true
|
2026-05-14 08:00:09 +00:00
|
|
|
ports:
|
|
|
|
|
- "2053:2053"
|
2026-05-18 12:43:59 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
container_name: 3xui_postgres
|
|
|
|
|
profiles: ["postgres"]
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: xui
|
|
|
|
|
POSTGRES_PASSWORD: xui
|
|
|
|
|
POSTGRES_DB: xui
|
|
|
|
|
volumes:
|
|
|
|
|
- $PWD/pgdata/:/var/lib/postgresql/data
|
2026-04-19 19:01:00 +00:00
|
|
|
restart: unless-stopped
|