Refactor installation script and clean up dependencies

Removed unnecessary dependencies and updated installation script formatting.
This commit is contained in:
thieneret 2026-02-22 09:24:31 +01:00 committed by GitHub
parent e72cf6624c
commit c0621f4c23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,16 +14,11 @@ setting_up_container
network_check network_check
update_os update_os
# Installing Dependencies with the 3 core dependencies (curl;sudo;mc)
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt install -y \ $STD apt install -y \
curl \
sudo \
mc \
build-essential \ build-essential \
pkg-config \ pkg-config \
libffi-dev \ libffi-dev \
git \
libxslt-dev \ libxslt-dev \
zlib1g-dev \ zlib1g-dev \
libpq-dev \ libpq-dev \
@ -34,8 +29,6 @@ $STD apt install -y \
libltdl-dev \ libltdl-dev \
libpq5 \ libpq5 \
libmaxminddb0 \ libmaxminddb0 \
ca-certificates \
krb5-multidev \
libkrb5-3 \ libkrb5-3 \
libkdb5-10 \ libkdb5-10 \
libkadm5clnt-mit12 \ libkadm5clnt-mit12 \
@ -43,10 +36,7 @@ $STD apt install -y \
libltdl7 \ libltdl7 \
libxslt1.1 \ libxslt1.1 \
python3-dev \ python3-dev \
wget \
gnupg \
libxml2-dev \ libxml2-dev \
libltdl7 \
libxml2 \ libxml2 \
libxslt1-dev \ libxslt1-dev \
automake \ automake \
@ -92,7 +82,7 @@ msg_ok "Go proxy installed"
fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary" fetch_and_deploy_gh_release "geoipupdate" "maxmind/geoipupdate" "binary"
cat <<EOF >/usr/local/etc/GeoIP.conf cat <<EOF>/usr/local/etc/GeoIP.conf
AccountID ChangeME AccountID ChangeME
LicenseKey ChangeME LicenseKey ChangeME
EditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country EditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country
@ -101,7 +91,7 @@ RetryFor 5m
Parallelism 1 Parallelism 1
EOF EOF
cat <<EOF >/tmp/crontab cat <<EOF>/tmp/crontab
#39 19 * * 6,4 /usr/bin/geoipupdate -f /usr/local/etc/GeoIP.conf #39 19 * * 6,4 /usr/bin/geoipupdate -f /usr/local/etc/GeoIP.conf
EOF EOF
crontab /tmp/crontab crontab /tmp/crontab
@ -145,7 +135,7 @@ cp /opt/authentik/tests/GeoLite2-ASN-Test.mmdb /opt/authentik-data/geoip/GeoLite
cp /opt/authentik/tests/GeoLite2-City-Test.mmdb /opt/authentik-data/geoip/GeoLite2-City.mmdb cp /opt/authentik/tests/GeoLite2-City-Test.mmdb /opt/authentik-data/geoip/GeoLite2-City.mmdb
$STD useradd -U -s /usr/sbin/nologin -r -M -d /opt/authentik authentik $STD useradd -U -s /usr/sbin/nologin -r -M -d /opt/authentik authentik
chown -R authentik:authentik /opt/authentik /opt/authentik-data chown -R authentik:authentik /opt/authentik /opt/authentik-data
cat <<EOF >/etc/default/authentik cat <<EOF>/etc/default/authentik
TMPDIR=/dev/shm/ TMPDIR=/dev/shm/
UV_LINK_MODE=copy UV_LINK_MODE=copy
UV_PYTHON_DOWNLOADS=0 UV_PYTHON_DOWNLOADS=0
@ -160,7 +150,7 @@ EOF
msg_ok "authentik config created" msg_ok "authentik config created"
msg_info "Creating services" msg_info "Creating services"
cat <<EOF >/etc/systemd/system/authentik-server.service cat <<EOF>/etc/systemd/system/authentik-server.service
[Unit] [Unit]
Description=authentik Go Server (API Gateway) Description=authentik Go Server (API Gateway)
After=network.target After=network.target
@ -180,7 +170,7 @@ EnvironmentFile=/etc/default/authentik
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
cat <<EOF >/etc/systemd/system/authentik-worker.service cat <<EOF>/etc/systemd/system/authentik-worker.service
[Unit] [Unit]
Description=authentik Worker Description=authentik Worker
After=network.target postgresql.service After=network.target postgresql.service