-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
Describe the issue
I noticed that if I already have the folder created (/var/www/aspecthq.com
), then the repo would not get initialized. I have to run the initial git clone
myself. Not a huge deal. I would expect it to work though.
Configuration
Paste full Caddyfile
below:
{
git {
repo aspecthq.com {
base_dir /var/www
url https://gitlab.com/joeworkman/aspecthq.com.git
branch master
depth 1
# auth ssh /var/www/ssh/id_rsa.pub
webhook name X-Gitlab-Token go-caddy-git-go
# post pull exec {
# name Pager
# command /usr/local/bin/pager
# args "pulled authp.github.io repo"
# }
}
}
}
aspecthq.com {
redir https://www.aspecthq.com{uri}
}
www.aspecthq.com {
log {
output file /var/log/caddy/aspecthq.com/access.log {
roll_size 3MiB
roll_keep 5
roll_keep_for 48h
}
}
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
# rewrite * /{http.error.status_code}.html
# file_server
}
route /update {
git update repo aspecthq.com
}
encode gzip zstd
php_fastcgi unix//run/php/php8.1-fpm.sock
file_server
root * /var/www/aspecthq.com
push
}
Version Information
Provide output of caddy list-modules -versions | grep git
below:
git v1.0.4
http.handlers.git v1.0.4