HsOjo / GitPagesMirror

Mirror your GitPages by Flask.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitPagesMirror

Mirror your GitPage by Flask.

How To Build

  • Install Python3.6+ in your machine.

  • Install requirements by pip.

pip install -r requirements.txt
  • Execute below code to add your repository mirror.
python manage.py add_repo
  • If config this program on server, pay attention to grant file permission for runtime directory.

Without Apache

  • Execute below code just OK.
python manage.py runserver -p [port]

With Apache (WSGI)

  • Execute below commands To Install Apache.
# Below code just use on Ubuntu.
apt install apache2
apt install libapache2-mod-wsgi-py3
a2enmod wsgi
  • Put Apache EnvVar Config.
# Add below code in the end of "/etc/apache2/envvars".
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
  • Add vHost.
<VirtualHost *:80>
        ServerName example.com
        DocumentRoot /var/www/GitPagesMirror
        WSGIScriptAlias / /var/www/GitPagesMirror/wsgi.py
</VirtualHost>
  • Put This Program To "/var/www".

With Nginx (uWSGI)

  • Add path mappings.
location / {
    include uwsgi_params;
    uwsgi_pass unix:///tmp/git-pages-mirror.sock;
}
  • Run uWSGI.
uwsgi uwsgi.ini

About

Mirror your GitPages by Flask.

License:MIT License


Languages

Language:Python 100.0%