Commit e1ec25b7 by John Jarvis

github mirror now using git-http-backend

parent ebb1a05e
...@@ -13,6 +13,8 @@ gh_mirror_orgs: ...@@ -13,6 +13,8 @@ gh_mirror_orgs:
- mfogel - mfogel
- mitocw - mitocw
- Stanford-Online - Stanford-Online
gh_mirror_debian_pkgs:
- fcgiwrap
gh_mirror_pip_pkgs: gh_mirror_pip_pkgs:
- pyyaml - pyyaml
- requests - requests
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
pip: name={{ item }} state=present pip: name={{ item }} state=present
with_items: gh_mirror_pip_pkgs with_items: gh_mirror_pip_pkgs
- name: gh_mirror | install debian packages
apt: >
pkg={{ ",".join(gh_mirror_debian_pkgs) }}
state=present
update_cache=yes
- name: gh_mirror | create gh_mirror user - name: gh_mirror | create gh_mirror user
user: > user: >
name={{ gh_mirror_user }} name={{ gh_mirror_user }}
......
server { server {
listen {{ gh_mirror_nginx_port }}; listen {{ gh_mirror_nginx_port }};
server_name {{ gh_mirror_server_name }}; server_name {{ gh_mirror_server_name }};
location / { location ~ (/.*) {
root {{ gh_mirror_data_dir }}; root {{ gh_mirror_data_dir }};
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
# This won't work if the include is put before
# SCRIPT_FILENAME
include fastcgi_params;
# export all repositories under GIT_PROJECT_ROOT
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT {{ gh_mirror_data_dir }};
fastcgi_param PATH_INFO $1;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment