commit
8f8dbbe5f9
@ -118,8 +118,8 @@ ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
|
||||
# Update NPM version in package.json files
|
||||
sed -i "s+0.0.0+#$_latest_version+g" backend/package.json
|
||||
sed -i "s+0.0.0+#$_latest_version+g" frontend/package.json
|
||||
sed -i "s+0.0.0+$_latest_version+g" backend/package.json
|
||||
sed -i "s+0.0.0+$_latest_version+g" frontend/package.json
|
||||
|
||||
# Fix nginx config files for use with openresty defaults
|
||||
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
|
||||
|
@ -7,7 +7,7 @@ TEMPLOG="$TEMPDIR/tmplog"
|
||||
TEMPERR="$TEMPDIR/tmperr"
|
||||
LASTCMD=""
|
||||
WGETOPT="-t 1 -T 15 -q"
|
||||
DEVDEPS="build-essential python3-dev git"
|
||||
DEVDEPS="git build-essential libffi-dev libssl-dev python3-dev"
|
||||
NPMURL="https://github.com/jc21/nginx-proxy-manager"
|
||||
|
||||
cd $TEMPDIR
|
||||
@ -64,28 +64,28 @@ if [ -f /lib/systemd/system/npm.service ]; then
|
||||
/var/cache/nginx &>/dev/null
|
||||
fi
|
||||
|
||||
# Update container OS
|
||||
log "Updating container OS"
|
||||
echo "fs.file-max = 65535" > /etc/sysctl.conf
|
||||
runcmd apt-get update
|
||||
runcmd apt-get upgrade -y
|
||||
|
||||
# Install dependencies
|
||||
log "Installing dependencies"
|
||||
runcmd 'apt-get -y install --no-install-recommends wget gnupg openssl ca-certificates apache2-utils logrotate $DEVDEPS'
|
||||
runcmd apt-get update
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
runcmd 'apt-get install -y --no-install-recommends $DEVDEPS gnupg openssl ca-certificates apache2-utils logrotate'
|
||||
|
||||
# Install Python
|
||||
log "Installing python"
|
||||
runcmd apt-get install -y -q --no-install-recommends python3 python3-pip python3-venv
|
||||
runcmd apt-get install -y -q --no-install-recommends python3 python3-distutils python3-venv
|
||||
python3 -m venv /opt/certbot/
|
||||
export PATH=/opt/certbot/bin:$PATH
|
||||
grep -qo "/opt/certbot" /etc/environment || echo "$PATH" > /etc/environment
|
||||
# Install certbot and python dependancies
|
||||
runcmd pip3 install --upgrade setuptools
|
||||
runcmd pip3 install --no-cache-dir -U cryptography==3.3.2
|
||||
runcmd pip3 install --no-cache-dir cffi certbot
|
||||
runcmd wget -qO - https://bootstrap.pypa.io/get-pip.py | python -
|
||||
if [ "$(getconf LONG_BIT)" = "32" ]; then
|
||||
runcmd pip install --no-cache-dir -U cryptography==3.3.2
|
||||
fi
|
||||
runcmd pip install --no-cache-dir cffi certbot
|
||||
|
||||
# Install openresty
|
||||
log "Installing openresty"
|
||||
wget -O - https://openresty.org/package/pubkey.gpg | apt-key add -
|
||||
wget -qO - https://openresty.org/package/pubkey.gpg | apt-key add -
|
||||
_distro_release=$(lsb_release -sc)
|
||||
_distro_release=$(wget $WGETOPT "http://openresty.org/package/ubuntu/dists/" -O - | grep -o "$_distro_release" | head -n1 || true)
|
||||
echo "deb [trusted=yes] http://openresty.org/package/ubuntu ${_distro_release:-focal} main" | tee /etc/apt/sources.list.d/openresty.list
|
||||
@ -93,7 +93,7 @@ runcmd apt-get update && apt-get install -y -q --no-install-recommends openresty
|
||||
|
||||
# Install nodejs
|
||||
log "Installing nodejs"
|
||||
runcmd wget -O - https://deb.nodesource.com/setup_14.x | bash -
|
||||
runcmd wget -qO - https://deb.nodesource.com/setup_14.x | bash -
|
||||
runcmd apt-get install -y -q --no-install-recommends nodejs
|
||||
runcmd npm install --global yarn
|
||||
|
||||
@ -110,14 +110,14 @@ cd ./nginx-proxy-manager-$_latest_version
|
||||
log "Setting up enviroment"
|
||||
# Crate required symbolic links
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
ln -sf /usr/bin/pip3 /usr/bin/pip
|
||||
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
|
||||
ln -sf /opt/certbot/bin/pip /usr/bin/pip
|
||||
ln -sf /opt/certbot/bin/certbot /usr/bin/certbot
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
|
||||
# Update NPM version in package.json files
|
||||
sed -i "s+0.0.0+#$_latest_version+g" backend/package.json
|
||||
sed -i "s+0.0.0+#$_latest_version+g" frontend/package.json
|
||||
sed -i "s+0.0.0+$_latest_version+g" backend/package.json
|
||||
sed -i "s+0.0.0+$_latest_version+g" frontend/package.json
|
||||
|
||||
# Fix nginx config files for use with openresty defaults
|
||||
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
|
||||
|
@ -19,7 +19,7 @@ wget -O "$TMP" "$URL/$DISTRO.sh"
|
||||
chmod +x "$TMP"
|
||||
|
||||
if [ "$(command -v bash)" ]; then
|
||||
bash "$TMP"
|
||||
sudo bash "$TMP"
|
||||
else
|
||||
sh "$TMP"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user