Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:hg [2024/07/16 15:56] – [Run it] darrontools: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 60: Line 62:
 __/var/www/repos/WWW.EXAMPLE.COM/hgweb.config__ __/var/www/repos/WWW.EXAMPLE.COM/hgweb.config__
 <code> <code>
-hgweb.config 
 [collections] [collections]
 /var/www/repos/WWW.EXAMPLE.COM = /var/www/repos/WWW.EXAMPLE.COM /var/www/repos/WWW.EXAMPLE.COM = /var/www/repos/WWW.EXAMPLE.COM
Line 85: Line 86:
 #RUN #RUN
 export TZ="UTC" export TZ="UTC"
-exec /bin/uwsgi --plugins http,python3 --http :9090 --master --processes 4 --threads 2 --uid=www-data --gid=www-data --wsgi-file /var/www/cgi-bin/hgweb.wsgi+exec /bin/uwsgi --die-on-term --plugins http,python3 --http :9090 --master --processes 4 --threads 2 --uid=www-data --gid=www-data --wsgi-file /var/www/cgi-bin/hgweb.wsgi 
 +</code> 
 + 
 + 
 +__UWSGI__ 
 + 
 +<code> 
 +#! /bin/bash 
 + 
 +#LOG 
 +exec 2>&
 +ulimit -l unlimited 
 +ulimit -i unlimited 
 +ulimit -q unlimited 
 +ulimit -n 8192 
 +ulimit -aH 
 + 
 +#RUN 
 +export TZ="UTC" 
 +mkdir -p /run/uwsgi 
 +chown -R www-data:www-data /run/uwsgi 
 +exec /bin/uwsgi --die-on-term --plugins python3 --uwsgi-socket /run/uwsgi/hgweb.sock --master --processes 4 --threads 2 --uid=www-data --gid=www-data --wsgi-file /var/www/cgi-bin/hgweb.wsgi 
 +</code> 
 +===NGINX=== 
 + 
 +<code> 
 +... 
 +        location / { 
 +                uwsgi_pass unix:/run/uwsgi/hgweb.sock; 
 +                include uwsgi_params; 
 + 
 +                limit_except GET HEAD { 
 +                        auth_basic "Login"; 
 +                        auth_basic_user_file /var/www/private/htpasswd; 
 +                } 
 +        } 
 + 
 +        location /static/ { 
 +                alias /usr/lib/python3/dist-packages/mercurial/templates/static/; 
 +                expires 30d; 
 +        } 
 +...
 </code> </code>