docker-compose.yml 927 B

12345678910111213141516171819202122232425262728293031323334
  1. services:
  2. 3xui:
  3. build:
  4. context: .
  5. dockerfile: ./Dockerfile
  6. container_name: 3xui_app
  7. # hostname: yourhostname <- optional
  8. volumes:
  9. - $PWD/db/:/etc/x-ui/
  10. - $PWD/cert/:/root/cert/
  11. environment:
  12. XRAY_VMESS_AEAD_FORCED: "false"
  13. XUI_ENABLE_FAIL2BAN: "true"
  14. # To use PostgreSQL instead of the default SQLite, run:
  15. # docker compose --profile postgres up -d
  16. # and uncomment the two lines below.
  17. # XUI_DB_TYPE: "postgres"
  18. # XUI_DB_DSN: "postgres://xui:xui@postgres:5432/xui?sslmode=disable"
  19. tty: true
  20. ports:
  21. - "2053:2053"
  22. restart: unless-stopped
  23. postgres:
  24. image: postgres:16-alpine
  25. container_name: 3xui_postgres
  26. profiles: ["postgres"]
  27. environment:
  28. POSTGRES_USER: xui
  29. POSTGRES_PASSWORD: xui
  30. POSTGRES_DB: xui
  31. volumes:
  32. - $PWD/pgdata/:/var/lib/postgresql/data
  33. restart: unless-stopped