fix directory path, alpine used /etc/nginx/http.d for nginx files

This commit is contained in:
Jesús 2021-07-09 22:57:41 -05:00
parent 1010d9d358
commit 58ad76ba54
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -15,12 +15,12 @@ if [ ! -f "/var/lib/git/.ssh/authorized_keys" ]; then
rm "/tmp/$SSH_KEY_NAME.pub" rm "/tmp/$SSH_KEY_NAME.pub"
fi fi
if [ ! -d /etc/nginx/conf.d ]; then if [ ! -d /etc/nginx/http.d ]; then
install -d -m755 /etc/nginx/conf.d || true install -d -m755 /etc/nginx/http.d || true
fi fi
# Init container # Init container
if [ ! -f /etc/nginx/conf.d/cgit.conf ]; then if [ ! -f /etc/nginx/http.d/cgit.conf ]; then
# enable random git password # enable random git password
GIT_PASSWORD=$(date +%s | sha256sum | base64 | head -c 32) GIT_PASSWORD=$(date +%s | sha256sum | base64 | head -c 32)
echo "git:$GIT_PASSWORD" | chpasswd echo "git:$GIT_PASSWORD" | chpasswd
@ -193,7 +193,8 @@ EOF
# /usr/lib/cgit/filters/syntax-highlighting.sh # /usr/lib/cgit/filters/syntax-highlighting.sh
# Nginx configuration # Nginx configuration
cat > /etc/nginx/conf.d/cgit.conf <<- EOF rm -v /etc/nginx/http.d/default.conf || true
cat > /etc/nginx/http.d/cgit.conf <<- EOF
server { server {
listen 80 default_server; listen 80 default_server;
server_name localhost; server_name localhost;