Skip to content

Commit

Permalink
config gunicorn conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Taited committed Nov 9, 2023
1 parent e2ea7a9 commit e7f1f1b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,5 @@ cython_debug/
*.pem
*.idea
.vscode
logs
test_*.py
24 changes: 24 additions & 0 deletions gunicorn_conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import os.path as osp
from pathlib import Path

current_file_path = Path(__file__).resolve()
current_dir_path = current_file_path.parent

# SSL
keyfile = 'key.pem'
certfile = 'cert.pem'

# Socket Path
bind = 'unix:' + osp.join(current_dir_path, 'gunicorn.sock')

# Worker Options
workers = 2
worker_class = 'uvicorn.workers.UvicornWorker'

# Logging Options
loglevel = 'debug'
log_dir = osp.join(current_dir_path, 'logs')
os.makedirs(log_dir, exist_ok=True)
accesslog = osp.join(log_dir, 'access.log')
errorlog = osp.join(log_dir, 'error.log')
2 changes: 1 addition & 1 deletion templates/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</div>

<footer class="site-footer">
<p style="margin: 7px 14px;">&copy; 2023 <a href="https://taited.github.io" target="_blank">Taited</a>
<p style="margin-top: 7px; margin-bottom: 14px;">&copy; 2023 <a href="https://taited.github.io" target="_blank">Taited</a>
| <a href="https://github.com/Taited/life-reload" target="_blank">Github</a>
| 改编自<a href="https://github.com/EmbraceAGI/LifeReloaded" target="_blank">Prompt版本 </a>
</p>
Expand Down

0 comments on commit e7f1f1b

Please sign in to comment.