Fixed gitea and caddy
This commit is contained in:
parent
39ff883347
commit
e782725111
@ -33,7 +33,6 @@ get_config() {
|
||||
. /federated/lib/panel.sh
|
||||
. /federated/lib/proxy.sh
|
||||
. /federated/lib/wireguard.sh
|
||||
. /federated/lib/connector.sh
|
||||
. /federated/lib/baserow.sh
|
||||
. /federated/lib/calcom.sh
|
||||
. /federated/lib/gitea.sh
|
||||
@ -80,7 +79,7 @@ check_ports
|
||||
config_network
|
||||
|
||||
# Configure and start each federated service
|
||||
for i in dns postgresql ldap mail collabora proxy nextcloud matrix element listmonk vaultwarden panel wireguard jitsi connector baserow calcom gitea caddy; do
|
||||
for i in dns postgresql ldap mail collabora proxy nextcloud matrix element listmonk vaultwarden panel wireguard jitsi baserow calcom gitea caddy; do
|
||||
config_$i
|
||||
start_$i
|
||||
done
|
||||
|
@ -189,6 +189,7 @@ vaultwarden IN A $EXTERNALIP
|
||||
vpn IN A $EXTERNALIP
|
||||
connector IN A $EXTERNALIP
|
||||
baserow IN A $EXTERNALIP
|
||||
gitea IN A $EXTERNALIP
|
||||
calcom IN A $EXTERNALIP
|
||||
blog IN A $EXTERNALIP
|
||||
documentation IN A $EXTERNALIP
|
||||
|
@ -187,7 +187,8 @@ check_ports() {
|
||||
|
||||
# Check if ss command exists
|
||||
if command -v ss &> /dev/null; then
|
||||
# Check every port we need if it's in use
|
||||
# Check every port we need if it's in use (only if we have never run before)
|
||||
if [ $(ls /federated/apps | wc -l) -eq "0" ]; then
|
||||
for i in 25 53 80 143 389 587 993 8000; do
|
||||
SS=`ss -tulwn | grep LISTEN | awk '{ print $5 }' | awk -F: '{ print $NF }' | grep "^$i$" | head -1`
|
||||
# If port 53 (dns) in use by system-resolvd (Ubuntu) then auto fix
|
||||
@ -223,6 +224,7 @@ check_ports() {
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
check_os() {
|
||||
VERSIONID=`grep "VERSION_ID=" /etc/os-release | awk -F\" '{ print $2 }'`
|
||||
|
@ -83,10 +83,10 @@ GITEA_TOKEN_2=\`curl -H "Content-Type: application/json" -d '{"name":"gitea2","s
|
||||
# Create the repository and webhooks
|
||||
for i in www blog documentation; do
|
||||
# Create the repository
|
||||
curl -k -X POST http://gitea.$DOMAIN:3000/api/v1/user/repos -H "content-type: application/json" -H "Authorization: token \$GITEA_TOKEN_2" --data '{"name":"$i.$DOMAIN","auto_init":true,"default_branch":"master"}'
|
||||
curl -k -X POST http://gitea.$DOMAIN:3000/api/v1/user/repos -H "content-type: application/json" -H "Authorization: token \$GITEA_TOKEN_2" --data "{\"name\":\"\$i.$DOMAIN\",\"auto_init\":true,\"default_branch\":\"master\"}"
|
||||
# Create the webhook
|
||||
curl -X 'POST' \
|
||||
'http://gitea.$DOMAIN:3000/api/v1/repos/gitea/$i.$DOMAIN/hooks' \
|
||||
"http://gitea.$DOMAIN:3000/api/v1/repos/gitea/\$i.$DOMAIN/hooks" \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "Authorization: token \$GITEA_TOKEN_2" \
|
||||
|
@ -39,7 +39,7 @@ networks:
|
||||
EOF
|
||||
|
||||
cat > /federated/apps/panel/.env <<EOF
|
||||
IMAGE_VERSION="1.10"
|
||||
IMAGE_VERSION="v1.10"
|
||||
VIRTUAL_PROTO=http
|
||||
VIRTUAL_PORT=80
|
||||
VIRTUAL_HOST=panel.$DOMAIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user