Files
xray_sub_server/docker-compose.yml
2026-05-29 08:04:53 +00:00

32 lines
982 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
xray-sub-server:
image: crutoboy/xray_sub_server:latest
container_name: xray-sub-server
restart: unless-stopped
ports:
- "2096:2096"
volumes:
# Монтируем папку с сертификатами
# Измените на свои. например,
# - /etc/letsencrypt/live/example.com:/certs:ro
- ./certs:/certs:ro
# Запуск через gunicorn с SSL
command: >
gunicorn
--workers=4
--bind=0.0.0.0:2096
--keyfile=/certs/privkey.pem
--certfile=/certs/fullchain.pem
wsgi:app
env_file:
- .env
# Пример с явным указанием переменных (альтернатива env_file):
# environment:
# LISTEN_HOST: 0.0.0.0
# LISTEN_PORT: 2096
# URI_PATH: /sub/
# SUBSCRIPTION_CACHE_TTL: 3600
# URLS: '{"all": [...]}' # большой JSON лучше хранить в .env файле