modifiche x port sftp tramite docker compose

This commit is contained in:
2025-11-03 16:34:04 +01:00
parent 10d58a3124
commit dc3a4395fa
2 changed files with 1 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ class Config:
c.read([f"{ENV_PARENT_PATH}/env/ftp.ini", f"{ENV_PARENT_PATH}/env/db.ini"])
# FTP setting (with environment variable override for Docker)
self.service_port = c.getint("ftpserver", "service_port")
self.service_port = int(os.getenv("FTP_PORT", c.getint("ftpserver", "service_port")))
# FTP_PASSIVE_PORTS: override della porta iniziale del range passivo
self.firstport = int(os.getenv("FTP_PASSIVE_PORTS", c.getint("ftpserver", "firstPort")))

View File

@@ -185,7 +185,6 @@ async def start_sftp_server(cfg, host='0.0.0.0', port=22):
port,
server_host_keys=['/app/ssh_host_key'], # You'll need to generate this
sftp_factory=SFTPFileHandler,
session_encoding=None, # Binary mode for file transfers
)
logger.info(f"SFTP server started successfully on {host}:{port}")