Compare commits

...

43 Commits

Author SHA1 Message Date
Miguel Muniz
fee5819332 Merge pull request #3 from Rogue-King/gitea
Gitea
2024-07-25 12:15:05 -07:00
Miguel Muniz
6beed2695a Merge branch 'tteck:main' into main 2024-07-25 12:04:59 -07:00
Rogue-King
643299ccba cleaning up debugging/redirects 2024-07-25 12:01:51 -07:00
Rogue-King
65b0964ff3 more debugging 2024-07-25 11:40:53 -07:00
Rogue-King
fddf4e0aa8 more debugging statements, note: redirected both repo and branch 2024-07-25 11:35:21 -07:00
Rogue-King
c1b130b5c5 Debugging 2024-07-25 11:30:25 -07:00
Miguel Muniz
cdc9d7b7a6 Merge branch 'tteck:main' into gitea 2024-07-25 11:26:03 -07:00
Rogue-King
667ac4af83 reformated install process and put them all under "installing Gitea" 2024-07-25 11:25:20 -07:00
Rogue-King
6f0235aa71 removed version variable and modified how release is obtained. added curl to dependencies and capitalized G 2024-07-25 09:53:12 -07:00
Miguel Muniz
f190221638 removed .gitignore 2024-07-23 22:29:40 -07:00
Miguel Muniz
229e9b8081 removed .gitignore 2024-07-23 22:27:58 -07:00
Miguel Muniz
304fda4508 Merge pull request #2 from Rogue-King/gitea
Gitea
2024-07-23 22:14:06 -07:00
Miguel Muniz
0d0f4afae7 Merge branch 'main' into gitea 2024-07-23 22:11:36 -07:00
Miguel Muniz
e6985a15c2 small changes 2024-07-23 21:55:46 -07:00
Miguel Muniz
a6d31d03cb added comments to systemd service file 2024-07-23 21:24:12 -07:00
Miguel Muniz
f4ba569f7e silencing user creation 2024-07-23 15:27:22 -07:00
Miguel Muniz
ec0893d90e refrence fix for testing 2024-07-23 15:07:30 -07:00
Miguel Muniz
78c02ea350 cleaning up debugging/redirects 2024-07-23 14:48:02 -07:00
Miguel Muniz
9848e3e1e6 Merge branch 'tteck:main' into main 2024-07-23 13:43:42 -07:00
Miguel Muniz
e92e6c06c0 changes to systemd to test 2024-07-23 13:12:00 -07:00
Miguel Muniz
5441bd2452 removed daemon-reload 2024-07-23 12:45:14 -07:00
Miguel Muniz
728100b13e debug change 2024-07-23 08:04:28 -07:00
Miguel Muniz
66d4d53ed8 more debugging fixes 2024-07-23 07:57:25 -07:00
Miguel Muniz
bc277d29e2 removed history folder 2024-07-22 21:02:11 -07:00
Miguel Muniz
7cded5fd17 more debugging 2024-07-22 20:21:17 -07:00
Miguel Muniz
d334e11417 debugging 2024-07-22 20:07:41 -07:00
Miguel Muniz
399daf6e34 more changes to build.func for testing 2024-07-22 15:40:49 -07:00
Miguel Muniz
5f98ed5d94 modifying build.func for testing 2024-07-22 15:33:00 -07:00
Miguel Muniz
ad087a949a modifying build.func for testing 2024-07-22 15:30:46 -07:00
Miguel Muniz
a0e6ba68fb fixed again where script finds gitea 2024-07-22 14:44:45 -07:00
Miguel Muniz
f70df3d963 finalized ascii art 2024-07-22 14:14:32 -07:00
Miguel Muniz
dc1a6fce0a fixed where the script looks for gitea.service 2024-07-22 13:11:06 -07:00
Miguel Muniz
86b5c8e9b5 small changes 2024-07-22 13:08:17 -07:00
Miguel Muniz
6991f3fd97 Update Gitea script to display the correct application name and version during the update process 2024-07-22 11:43:06 -07:00
Miguel Muniz
fc15af5693 fixes 2024-07-22 11:38:00 -07:00
Miguel Muniz
cf6e2726e7 test fix 2024-07-22 10:42:35 -07:00
Miguel Muniz
2fd158625d fixed update_script and obtaining latest releases 2024-07-22 10:40:16 -07:00
Miguel Muniz
381420ad50 minor fixes 2024-07-22 09:06:20 -07:00
Miguel Muniz
e8672ca2a6 fixed format 2024-07-22 08:35:35 -07:00
Miguel Muniz
4e41982f7d fixed .sh locations 2024-07-22 08:31:40 -07:00
Miguel Muniz
61ab0f83f6 Merge pull request #1 from Rogue-King/gitea
Gitea
2024-07-22 08:22:14 -07:00
Miguel Muniz
caf48b596f Merge branch 'tteck:main' into gitea 2024-07-22 08:13:56 -07:00
Rogue-King
7d6427cff8 First Gitea commit 2024-07-20 22:49:36 -07:00
2 changed files with 154 additions and 0 deletions

77
ct/gitea.sh Normal file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# Co-author: Rogue-King
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
function header_info {
clear
cat <<"EOF"
______ _ __
/ ____/(_)/ /____ ____ _
/ / __// // __/ _ \/ __ /
/ /_/ // // /_/ __/ /_/ /
\____//_/ \__/\___/\__,_/
EOF
}
header_info
echo -e "Loading..."
APP="Gitea"
var_disk="8"
var_cpu="1"
var_ram="512"
var_os="debian"
var_version="12"
variables
color
catch_errors
function default_settings() {
CT_TYPE="1"
PW=""
CT_ID=$NEXTID
HN=$NSAPP
DISK_SIZE="$var_disk"
CORE_COUNT="$var_cpu"
RAM_SIZE="$var_ram"
BRG="vmbr0"
NET="dhcp"
GATE=""
APT_CACHER=""
APT_CACHER_IP=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
function update_script() {
header_info
if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
msg_info "Updating $APP to ${RELEASE}"
wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64
systemctl stop gitea
rm -rf /usr/local/bin/gitea
mv gitea* /usr/local/bin/gitea
systemctl start gitea
msg_ok "Updated $APP Successfully"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:3000${CL} \n"

77
install/gitea-install.sh Normal file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# Co-author: Rogue-King
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y git
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
msg_ok "Installed Dependencies"
msg_info "Installing Gitea"
RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
wget -q https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-amd64
mv gitea* /usr/local/bin/gitea
chmod +x /usr/local/bin/gitea
adduser --system --group --disabled-password --home /etc/gitea gitea > /dev/null
mkdir -p /var/lib/gitea/{custom,data,log}
chown -R gitea:gitea /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
chown root:gitea /etc/gitea
chmod 770 /etc/gitea
msg_info "Installed Gitea"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/gitea.service
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
[Service]
# Uncomment notify and watchdog if you want to use them
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
# LimitNOFILE=524288:524288
RestartSec=2s
Type=simple
#Type=notify
User=gitea
Group=gitea
#The mount point we added to the container
WorkingDirectory=/var/lib/gitea
#Create directory in /run
RuntimeDirectory=gitea
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
#WatchdogSec=30s
#Capabilities to bind to low-numbered ports
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now gitea
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"