瀏覽代碼

add critical files for https

Jason 2 年之前
父節點
當前提交
8826f28a40
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      runhttps.py

+ 15 - 0
runhttps.py

@@ -0,0 +1,15 @@
+from backstage import create_app
+#from models import create_app
+import logging
+
+logger = logging.getLogger(__name__)
+
+app = create_app()
+
+
+if __name__ == '__main__':
+    context = ('/etc/letsencrypt/live/bhouse3.ptt.cx/fullchain.pem', '/etc/letsencrypt/live/bhouse3.ptt.cx/privkey.pem')
+    logging.basicConfig(
+        level=logging.INFO,
+        format='%(asctime)s %(levelname)s %(message)s')
+    app.run(host='0.0.0.0', debug=True, port=9002, ssl_context=context)