Skip to content

Commit 7ab6f0c

Browse files
committed
SSL
1 parent 1bc957c commit 7ab6f0c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ COPY howdoibot.py howdoibot.py
1313

1414
# run-time configuration
1515
# EXPOSE 5000
16-
ENTRYPOINT ["python howdoibot.py"]
16+
# ENTRYPOINT ["python howdoibot.py"]

howdoibot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
"https://{URL}/{SECRET_NUMBER}".format(**info), max_connections=1)
2222

2323
app = Flask(__name__)
24-
24+
CERT = 'server.crt'
25+
CERT_KEY = 'server.key'
2526
secret = "{SECRET_NUMBER}".format(**info)
26-
27+
context = (CERT, CERT_KEY)
2728

2829
howdoi_args = {
2930
'num_answers': 1,
@@ -50,4 +51,4 @@ def telegram_webhook():
5051

5152
if __name__ == "__main__":
5253
print(info)
53-
app.run(port=5000, debug=True, host='0.0.0.0')
54+
app.run(port=5000, ssl_context=context, debug=True, host='0.0.0.0')

0 commit comments

Comments
 (0)