Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:hg [2024/07/16 14:37] – [Run it] darron | tools:hg [2024/07/16 23:26] (current) – darron | ||
---|---|---|---|
Line 1: | Line 1: | ||
====Mercurial==== | ====Mercurial==== | ||
+ | |||
+ | This example install mercurial as a web service. | ||
===Install=== | ===Install=== | ||
Line 43: | Line 45: | ||
==CGI== | ==CGI== | ||
+ | |||
+ | __/ | ||
< | < | ||
- | bill$ cat / | ||
config = b"/ | config = b"/ | ||
import os | import os | ||
Line 53: | Line 56: | ||
from mercurial.hgweb import hgweb | from mercurial.hgweb import hgweb | ||
application = hgweb(config) | application = hgweb(config) | ||
+ | </ | ||
+ | |||
+ | ==CONF== | ||
+ | |||
+ | __/ | ||
+ | < | ||
+ | [collections] | ||
+ | / | ||
+ | |||
+ | [web] | ||
+ | staticurl = /static/ | ||
+ | allow_archive = gz | ||
</ | </ | ||
==RUN== | ==RUN== | ||
+ | __http__ | ||
< | < | ||
#! /bin/bash | #! /bin/bash | ||
Line 70: | Line 86: | ||
#RUN | #RUN | ||
export TZ=" | export TZ=" | ||
- | exec /bin/uwsgi --plugins http, | + | exec / |
+ | </ | ||
+ | |||
+ | |||
+ | __UWSGI__ | ||
+ | |||
+ | < | ||
+ | #! /bin/bash | ||
+ | |||
+ | #LOG | ||
+ | exec 2>& | ||
+ | ulimit -l unlimited | ||
+ | ulimit -i unlimited | ||
+ | ulimit -q unlimited | ||
+ | ulimit -n 8192 | ||
+ | ulimit -aH | ||
+ | |||
+ | #RUN | ||
+ | export TZ=" | ||
+ | mkdir -p / | ||
+ | chown -R www-data: | ||
+ | exec /bin/uwsgi --die-on-term --plugins python3 --uwsgi-socket / | ||
+ | </ | ||
+ | ===NGINX=== | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | location / { | ||
+ | uwsgi_pass unix:/ | ||
+ | include uwsgi_params; | ||
+ | |||
+ | limit_except GET HEAD { | ||
+ | auth_basic " | ||
+ | auth_basic_user_file / | ||
+ | } | ||
+ | } | ||
+ | |||
+ | location /static/ { | ||
+ | alias / | ||
+ | expires 30d; | ||
+ | } | ||
+ | ... | ||
</ | </ | ||