Compare commits
No commits in common. "277e891b2163af7a9046c257996b24b0d22bcec6" and "1215d25186833c29401169d609b64b2f731ae2c7" have entirely different histories.
277e891b21
...
1215d25186
|
@ -1,5 +1,5 @@
|
||||||
# Setup caddy config
|
# Setup caddy config
|
||||||
mkdir -p /etc/caddy
|
mkdir /etc/caddy
|
||||||
cp -R ./caddy/* /etc/caddy
|
cp -R ./caddy/* /etc/caddy
|
||||||
|
|
||||||
# Setup caddy service
|
# Setup caddy service
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
# Check if already installed
|
# Install prerequistes
|
||||||
if [[ $(which caddy) != "/usr/bin/caddy" ]]; then
|
nala install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
||||||
# Install prerequistes
|
|
||||||
nala install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
|
||||||
|
|
||||||
# Install sources and keys
|
# Install sources and keys
|
||||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
||||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
|
||||||
fi
|
|
||||||
|
|
||||||
# Install or upgrade caddy
|
# Install caddy
|
||||||
nala install -y caddy
|
nala install -y caddy
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
# Get latest forgejo tag
|
# Get latest forgejo tag
|
||||||
LATEST=curl -fsS https://codeberg.org/forgejo/forgejo/releases/latest | grep -o "[0-9].[0-9].[0-9]" | head -1
|
LATEST=curl -fsS https://codeberg.org/forgejo/forgejo/releases/latest | grep -o "[0-9].[0-9].[0-9]"
|
||||||
|
|
||||||
# Check if already installed
|
# Download forgejo
|
||||||
if [[ $(forgejo -v 2> /dev/null | grep -o "[0-9].[0-9].[0-9]" | head -1) != $LATEST ]]; then
|
wget "https://codeberg.org/forgejo/forgejo/releases/download/$LATEST/forgejo-$LATEST-linux-amd64"
|
||||||
# Download forgejo
|
chmod +x "forgejo-$LATEST-linux-amd64"
|
||||||
wget "https://codeberg.org/forgejo/forgejo/releases/download/$LATEST/forgejo-$LATEST-linux-amd64"
|
|
||||||
chmod +x "forgejo-$LATEST-linux-amd64"
|
|
||||||
|
|
||||||
# Check GPG Keys
|
# Check GPG Keys
|
||||||
gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
||||||
wget "https://codeberg.org/forgejo/forgejo/releases/download/v$LATEST/forgejo-$LATEST-linux-amd64.asc"
|
wget "https://codeberg.org/forgejo/forgejo/releases/download/v$LATEST/forgejo-$LATEST-linux-amd64.asc"
|
||||||
gpg --verify "forgejo-$LATEST-linux-amd64.asc" "forgejo-$LATEST-linux-amd64"
|
gpg --verify "forgejo-$LATEST-linux-amd64.asc" "forgejo-$LATEST-linux-amd64"
|
||||||
|
|
||||||
# Create group and user
|
# Create group and user
|
||||||
groupadd --system forgejo
|
groupadd --system forgejo
|
||||||
|
|
||||||
useradd --system \
|
useradd --system \
|
||||||
--gid forgejo
|
--gid forgejo
|
||||||
--create-home \
|
--create-home \
|
||||||
--home-dir /var/lib/forgejo \
|
--home-dir /var/lib/forgejo \
|
||||||
|
@ -23,16 +21,15 @@ if [[ $(forgejo -v 2> /dev/null | grep -o "[0-9].[0-9].[0-9]" | head -1) != $LAT
|
||||||
--comment "Forgejo Git forge" \
|
--comment "Forgejo Git forge" \
|
||||||
forgejo
|
forgejo
|
||||||
|
|
||||||
# Setup forgejo directories
|
# Setup forgejo directories
|
||||||
mv "forgejo-$LATEST-linux-amd64" /usr/local/bin/forgejo
|
mv "forgejo-$LATEST-linux-amd64" /usr/local/bin/forgejo
|
||||||
fi
|
|
||||||
|
|
||||||
## Working directory
|
## Working directory
|
||||||
mkdir -p /var/lib/forgejo
|
mkdir /var/lib/forgejo
|
||||||
chown forgejo:forgejo /var/lib/forgejo && chmod 750 /var/lib/forgejo
|
chown forgejo:forgejo /var/lib/forgejo && chmod 750 /var/lib/forgejo
|
||||||
|
|
||||||
## Config directory
|
## Config directory
|
||||||
mkdir -p /etc/forgejo
|
mkdir /etc/forgejo
|
||||||
chown root:forgejo /etc/forgejo && chmod 540 /etc/forgejo
|
chown root:forgejo /etc/forgejo && chmod 540 /etc/forgejo
|
||||||
|
|
||||||
# Check requirements
|
# Check requirements
|
||||||
|
|
|
@ -1,22 +1,16 @@
|
||||||
# Check if already installed
|
# Install deno
|
||||||
if [[ $(which deno) == "/usr/local/bin/deno" ]]; then
|
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh
|
||||||
# Upgrade deno
|
|
||||||
deno upgrade
|
|
||||||
else
|
|
||||||
# Install deno
|
|
||||||
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh
|
|
||||||
|
|
||||||
# Create group and user
|
# Create group and user
|
||||||
groupadd --system deno
|
groupadd --system deno
|
||||||
|
|
||||||
useradd --system \
|
useradd --system \
|
||||||
--gid deno \
|
--gid deno \
|
||||||
--create-home \
|
--create-home \
|
||||||
--home-dir /var/lib/deno \
|
--home-dir /var/lib/deno \
|
||||||
--shell /usr/sbin/nologin \
|
--shell /usr/sbin/nologin \
|
||||||
--comment "Deno js engine" \
|
--comment "Deno js engine" \
|
||||||
deno
|
deno
|
||||||
fi
|
|
||||||
|
|
||||||
# Clone website repo
|
# Clone website repo
|
||||||
mkdir -p /srv/www
|
mkdir -p /srv/www
|
||||||
|
|
Loading…
Reference in a new issue