Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hsojo/gitpagesmirror
Mirror your GitPages by Flask.
https://github.com/hsojo/gitpagesmirror
Last synced: 10 days ago
JSON representation
Mirror your GitPages by Flask.
- Host: GitHub
- URL: https://github.com/hsojo/gitpagesmirror
- Owner: HsOjo
- License: mit
- Created: 2019-11-24T10:32:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-12T03:35:19.000Z (over 3 years ago)
- Last Synced: 2024-11-07T22:30:57.911Z (2 months ago)
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitPagesMirror
Mirror your GitPage by Flask.
## How To Build
* Install Python3.6+ in your machine.
* Install requirements by pip.
```bash
pip install -r requirements.txt
```* Execute below code to add your repository mirror.
```bash
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.
```bash
python manage.py runserver -p [port]
```### With Apache (WSGI)
* Execute below commands To Install Apache.
```bash
# Below code just use on Ubuntu.
apt install apache2
apt install libapache2-mod-wsgi-py3
a2enmod wsgi
```* Put Apache EnvVar Config.
```bash
# 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.
```text
ServerName example.com
DocumentRoot /var/www/GitPagesMirror
WSGIScriptAlias / /var/www/GitPagesMirror/wsgi.py```
* Put This Program To "/var/www".
### With Nginx (uWSGI)
* Add path mappings.
```text
location / {
include uwsgi_params;
uwsgi_pass unix:///tmp/git-pages-mirror.sock;
}
```* Run uWSGI.
```bash
uwsgi uwsgi.ini
```