feat(proxy): add VLESS/Xray proxy configuration and update Docker setup

This commit is contained in:
2026-06-06 19:30:25 +03:30
parent 7cb4459fd4
commit dee1c3ab16
8 changed files with 383 additions and 11 deletions

View File

@@ -1,15 +1,51 @@
x-build-args: &build-args
DOCKER_REGISTRY: ${DOCKER_REGISTRY:-docker.arvancloud.ir}
HTTP_PROXY: ${DOCKER_BUILD_HTTP_PROXY:-}
HTTPS_PROXY: ${DOCKER_BUILD_HTTPS_PROXY:-${DOCKER_BUILD_HTTP_PROXY:-}}
NO_PROXY: ${DOCKER_BUILD_NO_PROXY:-localhost,127.0.0.1,::1}
http_proxy: ${DOCKER_BUILD_HTTP_PROXY:-}
https_proxy: ${DOCKER_BUILD_HTTPS_PROXY:-${DOCKER_BUILD_HTTP_PROXY:-}}
no_proxy: ${DOCKER_BUILD_NO_PROXY:-localhost,127.0.0.1,::1}
DEBIAN_APT_MIRROR: ${DEBIAN_APT_MIRROR:-}
DEBIAN_SECURITY_APT_MIRROR: ${DEBIAN_SECURITY_APT_MIRROR:-}
DEBIAN_APT_DISABLE_UPDATES: ${DEBIAN_APT_DISABLE_UPDATES:-}
x-app-proxy-environment: &app-proxy-environment
HTTP_PROXY: ${APP_HTTP_PROXY:-}
HTTPS_PROXY: ${APP_HTTPS_PROXY:-${APP_HTTP_PROXY:-}}
NO_PROXY: ${APP_NO_PROXY:-localhost,127.0.0.1,::1,mariadb,nginx,app,queue,scheduler,vless-proxy}
services:
vless-proxy:
image: ${XRAY_IMAGE:-ghcr.io/xtls/xray-core:latest}
restart: unless-stopped
profiles:
- proxy
command: ["run", "-config", "/usr/local/etc/xray/config.json"]
volumes:
- type: bind
source: ${XRAY_CONFIG_FILE:-./docker/xray/config.local.json}
target: /usr/local/etc/xray/config.json
read_only: true
bind:
create_host_path: false
ports:
- "127.0.0.1:${VLESS_PROXY_HTTP_PORT:-2080}:8080"
- "127.0.0.1:${VLESS_PROXY_SOCKS_PORT:-2081}:1080"
networks:
- hoshpoint
app:
build:
context: .
target: app
args:
DOCKER_REGISTRY: docker.arvancloud.ir
args: *build-args
image: hoshpoint-backend-app:production
restart: unless-stopped
env_file:
- ${APP_ENV_FILE:-.env.production}
environment:
<<: *app-proxy-environment
APP_ENV: production
APP_DEBUG: "false"
LOG_CHANNEL: stderr
@@ -27,8 +63,7 @@ services:
build:
context: .
target: nginx
args:
DOCKER_REGISTRY: docker.arvancloud.ir
args: *build-args
image: hoshpoint-backend-nginx:production
restart: unless-stopped
depends_on:
@@ -46,6 +81,7 @@ services:
env_file:
- ${APP_ENV_FILE:-.env.production}
environment:
<<: *app-proxy-environment
APP_ENV: production
APP_DEBUG: "false"
LOG_CHANNEL: stderr
@@ -66,6 +102,7 @@ services:
env_file:
- ${APP_ENV_FILE:-.env.production}
environment:
<<: *app-proxy-environment
APP_ENV: production
APP_DEBUG: "false"
LOG_CHANNEL: stderr