Improved install.sh speed.

Signed-off-by: Derek Smith <derek@farscapian.com>
This commit is contained in:
Derek Smith 2022-05-10 12:15:32 -04:00
parent 05d23dabcb
commit 5f420deb18
Signed by: farscapian
GPG Key ID: 8F1CD799CCA516CC
5 changed files with 9 additions and 57 deletions

19
.gitignore vendored
View File

@ -1,20 +1,3 @@
archive/*
# this gets generated locally then push to remote vps for execution.
temp_btcpay.sh
nginx.conf
# this file can be used by the USER to reset the LXD stack. It deletes a lxc machine VM (which you should update)
# then clears the lxd stack including profile, images, and storage pools
# then runs go.sh
reset.sh
# you can create an env in this directory. The code will source it if the file exists.
# This is a good place to put your LXD info
env env
clear_lxd_stack.sh clear_lxd_stack.sh
publish_tag.sh
publish_tag.sh

View File

@ -1,11 +0,0 @@
#!/bin/bash
LXD_VM_NAME="www-sovereign-stack-org"
lxc delete -f "$LXD_VM_NAME"
lxc profile delete "$LXD_VM_NAME"
lxc image delete "sovereign-stack-base" "ubuntu-21-04"
#lxc storage delete default

View File

@ -14,7 +14,7 @@ if [ "$VPS_HOSTING_TARGET" = aws ]; then
-p 443:443 \ -p 443:443 \
-v /etc/letsencrypt:/etc/letsencrypt \ -v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt certbot/certbot \ -v /var/lib/letsencrypt:/var/lib/letsencrypt certbot/certbot \
certonly -v --noninteractive --agree-tos --key-type ecdsa --standalone --expand -d "$DOMAIN_NAME" -d "$FQDN" -d "$NEXTCLOUD_FQDN" -d "$MATRIX_FQDN" -d "$GITEA_FQDN" --email "$CERTIFICATE_EMAIL_ADDRESS" certonly -v --noninteractive --agree-tos --key-type ecdsa --standalone --expand -d "$DOMAIN_NAME" -d "$FQDN" -d "$NEXTCLOUD_FQDN" -d "$GITEA_FQDN" --email "$CERTIFICATE_EMAIL_ADDRESS"
# backup the certs to our SITE_PATH/certs.tar.gz so we have them handy (for local development) # backup the certs to our SITE_PATH/certs.tar.gz so we have them handy (for local development)
ssh "$FQDN" sudo tar -zcvf "$REMOTE_HOME/certs.tar.gz" -C /etc ./letsencrypt ssh "$FQDN" sudo tar -zcvf "$REMOTE_HOME/certs.tar.gz" -C /etc ./letsencrypt

View File

@ -1,8 +1,13 @@
#!/bin/bash #!/bin/bash
sudo apt-get remove docker docker-engine docker.io containerd runc
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update sudo apt-get update
sudo apt-get install -y wait-for-it dnsutils rsync sshfs sudo apt-get install -y wait-for-it dnsutils rsync sshfs apt-transport-https ca-certificates curl gnupg lsb-release docker-ce-cli python3-pip libusb-1.0-0-dev libudev-dev pinentry-curses
if [ ! -f $(which lxd) ]; then if [ ! -f $(which lxd) ]; then
sudo snap install lxd sudo snap install lxd
@ -10,21 +15,10 @@ fi
# let's ensure docker-machine is available. # let's ensure docker-machine is available.
base="https://github.com/docker/machine/releases/download/v0.16.2" base="https://github.com/docker/machine/releases/download/v0.16.2"
curl -L "$base/docker-machine-$(uname -s)-$(uname -m)" >/tmp/docker-machine curl -s -L "$base/docker-machine-$(uname -s)-$(uname -m)" >/tmp/docker-machine
sudo mv /tmp/docker-machine /usr/local/bin/docker-machine sudo mv /tmp/docker-machine /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine chmod +x /usr/local/bin/docker-machine
# NOTE!!! DOCKER CLI MUST BE INSTALLED VIA instructions at https://docs.docker.com/engine/install/ubuntu/ DO NOT USE SNAP
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce-cli -y
# install trezor requirements https://wiki.trezor.io/Apps:SSH_agent
sudo apt update && sudo apt install python3-pip libusb-1.0-0-dev libudev-dev pinentry-curses
pip3 install trezor_agent pip3 install trezor_agent
sudo cp ./51-trezor.rules /etc/udev/rules.d/51-trezor.rules sudo cp ./51-trezor.rules /etc/udev/rules.d/51-trezor.rules

View File

@ -1,14 +0,0 @@
#!/bin/bash
# this script will tag the repo then push it to origin
TAG_NAME=v0.0.18
COMIT_MESSAGE="Creating commit on $(date)."
TAG_MESSAGE="Creating tag $TAG_NAME on $(date)."
# create a git commit with staged changes.
git commit -m "$COMIT_MESSAGE" -s
git tag -a "$TAG_NAME" -m "$TAG_MESSAGE" -s
# optional; push to remote
git push --all
git push --tags