fix: minor fixes for ubuntu setup
This commit is contained in:
parent
451b7de339
commit
cf7ae548b9
@ -7,6 +7,7 @@ TEMPLOG="$TEMPDIR/tmplog"
|
|||||||
TEMPERR="$TEMPDIR/tmperr"
|
TEMPERR="$TEMPDIR/tmperr"
|
||||||
LASTCMD=""
|
LASTCMD=""
|
||||||
WGETOPT="-t 1 -T 15 -q"
|
WGETOPT="-t 1 -T 15 -q"
|
||||||
|
DEVDEPS="build-essential python3-dev git"
|
||||||
NPMURL="https://github.com/jc21/nginx-proxy-manager"
|
NPMURL="https://github.com/jc21/nginx-proxy-manager"
|
||||||
|
|
||||||
cd $TEMPDIR
|
cd $TEMPDIR
|
||||||
@ -40,7 +41,7 @@ trapexit() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
apt-get remove --purge -y build-essential python3-dev git -qq &>/dev/null
|
apt-get remove --purge -y $DEVDEPS -qq &>/dev/null
|
||||||
apt-get autoremove -y -qq &>/dev/null
|
apt-get autoremove -y -qq &>/dev/null
|
||||||
apt-get clean
|
apt-get clean
|
||||||
rm -rf $TEMPDIR
|
rm -rf $TEMPDIR
|
||||||
@ -63,20 +64,23 @@ if [ -f /lib/systemd/system/npm.service ]; then
|
|||||||
/var/cache/nginx &>/dev/null
|
/var/cache/nginx &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install dependencies
|
# Update container OS
|
||||||
log "Installing dependencies"
|
log "Updating container OS"
|
||||||
echo "fs.file-max = 65535" > /etc/sysctl.conf
|
echo "fs.file-max = 65535" > /etc/sysctl.conf
|
||||||
runcmd apt-get update
|
runcmd apt-get update
|
||||||
runcmd apt-get upgrade -y
|
runcmd apt-get upgrade -y
|
||||||
runcmd apt-get -y install --no-install-recommends wget gnupg openssl ca-certificates apache2-utils logrotate build-essential python3-dev git
|
|
||||||
|
# Install dependencies
|
||||||
|
log "Installing dependencies"
|
||||||
|
runcmd 'apt-get -y install --no-install-recommends wget gnupg openssl ca-certificates apache2-utils logrotate $DEVDEPS'
|
||||||
|
|
||||||
# Install Python
|
# Install Python
|
||||||
log "Installing 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-pip python3-venv
|
||||||
python3 -m venv /opt/certbot/
|
python3 -m venv /opt/certbot/
|
||||||
if [ "$(getconf LONG_BIT)" = "32" ]; then
|
# Install certbot and python dependancies
|
||||||
runcmd pip3 install --no-cache-dir -U cryptography==3.3.2
|
runcmd pip3 install --upgrade setuptools
|
||||||
fi
|
runcmd pip3 install --no-cache-dir -U cryptography==3.3.2
|
||||||
runcmd pip3 install --no-cache-dir cffi certbot
|
runcmd pip3 install --no-cache-dir cffi certbot
|
||||||
|
|
||||||
# Install openresty
|
# Install openresty
|
||||||
@ -209,7 +213,7 @@ Wants=openresty.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
|
ExecStartPre=-/bin/mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
|
||||||
ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250
|
ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250
|
||||||
WorkingDirectory=/app
|
WorkingDirectory=/app
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
Loading…
Reference in New Issue
Block a user