add ssl support
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 38s

This commit is contained in:
crutoboy
2026-05-29 07:57:31 +00:00
parent 30742ad47d
commit c47c90b484
3 changed files with 17 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
certs
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
certs
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]

View File

@@ -7,6 +7,19 @@ services:
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):