make docker-remote not force a .git extension

---
type: change
message: |-
  make docker-remote not force a .git extension

  There wasn't really a good reason to do so, except convention maybe, but even
  then I'm not sure it was a real convention. This commit also fixes the docker
  image naming for docker-remote
change_hash: AAdGtR83SalP03yPlU0FDNkzlDzgWFXs08vJ26KtB8du
credentials:
- type: pgp_signature
  pub_key_id: 95C46FA6A41148AC
  body: iQIzBAABAgAdFiEEJ6tQKp6olvZKJ0lwlcRvpqQRSKwFAl6BDAkACgkQlcRvpqQRSKwcsxAAtfvN8xNqWAXS48MVApoFPtK4GoUeoJsW+2KVWlaHYxwOtROaLoXBp+reNn9ESeetebQB8qPY44/xwmQuZ//CKt1iDvGqf470FW6bnm+LFNmpX5X49WUKs2KeTSXBeVYRtz8vZKPkQyfhlcUB2rHtVIWbqXPFXV4UtufqEnSu1LEgF+MORkNzOkoF35xRzp6pUlcmOc4Q1TUvK5+m3QXQpD9g3imA2fp49rmfVQ4E9OdtFAPxfhCWEdi2Zre8k9W2XFgCak/SX++9i1/7eyfC896RiCPD/cR/OvzXlCE8psuORAJ0MqcaJCYWz84KWVKH2sHqmkT0AYnrJRV+QXWWUS3ePZX/LzGBqgkxU8AuNiGXiDl5X9XVBRpCbYdwAjO0s4CoV6okH06euqlpvKhsLDKW6/TlIAqDVNg91Pqklu/oSd37faGCDfvDgsWvuypXe1VG+o2MXIdP5Z1Keis0tPKRyNCILa9aG8Jzue4Eaa3OnLCPnzT/MaXbTgAosLZf/IObyEGNhGnGZzUXXlwbwJNHQfeim1sILUEWCTU7/NrupSPOmjNzFcSQmvmLj4iBqnFikQez48uYl/ZL7jFYxbOxiPmXCNe+NX42TExT9P6wLkQs5kKzFbNKUgx5W5ou1ZQuqJ8CflS/eUBA+FEpb4nYdgPMKNwMPW/MD42Z1Uk=
  account: mediocregopher
This commit is contained in:
mediocregopher 2020-03-29 14:59:01 -06:00
parent ee19d2c37e
commit e91f7b060e
4 changed files with 12 additions and 15 deletions

View File

@ -4,8 +4,11 @@ This directory provides a simple Docker image which can be spun up to run a
dehub-enabled git http remote server. Commits which are pushed to this server dehub-enabled git http remote server. Commits which are pushed to this server
will be automatically verified using `dehub verify`. will be automatically verified using `dehub verify`.
The docker image is also being hosted on docker hub at `mediocregopher/dehub`. The docker image is also being hosted on docker hub at
Proper image tagging/versioning coming soon! [mediocregopher/dehub-remote][dehub-remote]. Proper image tagging/versioning
coming soon!
[dehub-remote]: https://hub.docker.com/repository/docker/mediocregopher/dehub-remote
## Usage ## Usage
@ -17,12 +20,13 @@ docker run \
-v /opt/dehub/repos:/repos \ -v /opt/dehub/repos:/repos \
-v /opt/dehub/www:/var/www \ -v /opt/dehub/www:/var/www \
-p 8080:80 \ -p 8080:80 \
mediocregopher/dehub repo-a repo-b mediocregopher/dehub-remote repo-a.git repo-b.git
``` ```
Will start an http server on port 8080, using `/opt/dehub/repos` to store all Will start an http server on port 8080, using `/opt/dehub/repos` to store all
repo folders. It will then initialize repos at `/opt/dehub/repos/repo-a.git` and repo folders. It will then initialize repo directories at
`/opt/dehub/repos/repo-b.git`, if they arent already there. `/opt/dehub/repos/repo-a.git` and `/opt/dehub/repos/repo-b.git`, if they arent
already there.
If a volume for `/var/www` is given then that will be used as the root for all If a volume for `/var/www` is given then that will be used as the root for all
non-git http requests. non-git http requests.
@ -32,4 +36,3 @@ non-git http requests.
The Dockerfile being used is based on The Dockerfile being used is based on
[gitbox](https://github.com/nmarus/docker-gitbox), so thank you to nmarus for [gitbox](https://github.com/nmarus/docker-gitbox), so thank you to nmarus for
the great work there. the great work there.

View File

@ -31,12 +31,12 @@ http {
error_log /var/log/nginx/MYSERVER.error.log error; error_log /var/log/nginx/MYSERVER.error.log error;
#git SMART HTTP #git SMART HTTP
location ~ /(.*\.git.*) { location / {
client_max_body_size 0; client_max_body_size 0;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
fastcgi_param GIT_HTTP_EXPORT_ALL ""; fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /repos; fastcgi_param GIT_PROJECT_ROOT /repos;
fastcgi_param PATH_INFO /$1; fastcgi_param PATH_INFO $uri;
include /etc/nginx/fastcgi_params; include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_pass unix:/var/run/fcgiwrap.socket;
} }

View File

@ -1,6 +0,0 @@
docker run \
--rm -it \
--name gitbox \
-p 8080:80 \
-v $(pwd)/srv:/repos \
gitbox

View File

@ -67,7 +67,7 @@ sed -i "s,MYSERVER,${FQDN},g" /etc/nginx/nginx.conf &> /dev/null
# create the individual repo directories # create the individual repo directories
while [ ! -z "$1" ]; do while [ ! -z "$1" ]; do
dir="/repos/$1.git"; dir="/repos/$1";
if [ ! -d "$dir" ]; then if [ ! -d "$dir" ]; then
echo "Initializing repo $1" echo "Initializing repo $1"
mkdir "$dir" mkdir "$dir"