mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-05-03 05:38:49 +00:00
Merge pull request #5 from serogaq/feature/4.dockerComposeEnv
4 / env and memory limit
This commit is contained in:
commit
e1be3cbc40
3 changed files with 27 additions and 18 deletions
7
.env.example
Normal file
7
.env.example
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
DOCKER_DEFAULT_PLATFORM=linux/amd64
|
||||||
|
COMPOSE_PROJECT_NAME=3x
|
||||||
|
BUILD_WITH_ANTIZAPRET="0"
|
||||||
|
XUI_SERVER_IP=""
|
||||||
|
XUI_PANEL_DOMAIN=""
|
||||||
|
XUI_SUB_DOMAIN=""
|
||||||
|
XUI_VLESS_SNI=""
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -2,12 +2,16 @@
|
||||||
.vscode
|
.vscode
|
||||||
.cache
|
.cache
|
||||||
.sync*
|
.sync*
|
||||||
|
.env
|
||||||
|
*.tar
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.log
|
*.log
|
||||||
access.log
|
access.log
|
||||||
error.log
|
error.log
|
||||||
tmp
|
tmp
|
||||||
main
|
main
|
||||||
|
db/
|
||||||
|
cert/
|
||||||
backup/
|
backup/
|
||||||
bin/
|
bin/
|
||||||
dist/
|
dist/
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
---
|
---
|
||||||
version: "3"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
3x-ui:
|
ui:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
ANTIZAPRET: "1"
|
ANTIZAPRET: "${BUILD_WITH_ANTIZAPRET:-0}"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -18,21 +16,21 @@ services:
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- "traefik.enable=true"
|
||||||
- traefik.http.routers.3x-ui.rule=Host(`<...>`)
|
- "traefik.http.routers.3x-ui.rule=Host(`${XUI_PANEL_DOMAIN}`)"
|
||||||
- traefik.http.routers.3x-ui.service=3x-ui
|
- "traefik.http.routers.3x-ui.service=3x-ui"
|
||||||
- traefik.http.routers.3x-ui.entrypoints=https
|
- "traefik.http.routers.3x-ui.entrypoints=https"
|
||||||
- traefik.http.services.3x-ui.loadbalancer.server.port=<...>
|
- "traefik.http.services.3x-ui.loadbalancer.server.port=2053"
|
||||||
#
|
#
|
||||||
- traefik.http.routers.3x-ui-sub.rule=Host(`<...>`)
|
- "traefik.http.routers.3x-ui-sub.rule=Host(`${XUI_SUB_DOMAIN}`)"
|
||||||
- traefik.http.routers.3x-ui-sub.service=3x-ui-sub
|
- "traefik.http.routers.3x-ui-sub.service=3x-ui-sub"
|
||||||
- traefik.http.routers.3x-ui-sub.entrypoints=https
|
- "traefik.http.routers.3x-ui-sub.entrypoints=https"
|
||||||
- traefik.http.services.3x-ui-sub.loadbalancer.server.port=<...>
|
- "traefik.http.services.3x-ui-sub.loadbalancer.server.port=2096"
|
||||||
#
|
#
|
||||||
- traefik.tcp.routers.vless.rule=HostSNI(`<...>`)
|
- "traefik.tcp.routers.vless.rule=HostSNI(`${XUI_VLESS_SNI}`)"
|
||||||
- traefik.tcp.routers.vless.tls.passthrough=true
|
- "traefik.tcp.routers.vless.tls.passthrough=true"
|
||||||
- traefik.tcp.routers.vless.service=3x-ui-inbound-443
|
- "traefik.tcp.routers.vless.service=3x-ui-inbound-443"
|
||||||
- traefik.tcp.services.3x-ui-inbound-443.loadbalancer.server.port=443
|
- "traefik.tcp.services.3x-ui-inbound-443.loadbalancer.server.port=443"
|
||||||
volumes:
|
volumes:
|
||||||
- $PWD/db/:/etc/x-ui/
|
- $PWD/db/:/etc/x-ui/
|
||||||
- $PWD/cert/:/root/cert/
|
- $PWD/cert/:/root/cert/
|
||||||
|
@ -41,7 +39,7 @@ services:
|
||||||
PGID: 1000
|
PGID: 1000
|
||||||
XRAY_VMESS_AEAD_FORCED: "false"
|
XRAY_VMESS_AEAD_FORCED: "false"
|
||||||
TZ: Europe/Moscow
|
TZ: Europe/Moscow
|
||||||
XUI_SERVER_IP: "" # Server IP
|
XUI_SERVER_IP: "${XUI_SERVER_IP}"
|
||||||
tty: true
|
tty: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue