Consolidated deployment scripts
This commit is contained in:
40
deployment/client/client-launch.sh
Executable file
40
deployment/client/client-launch.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ~/.config/TAM3/data
|
||||
|
||||
read -p "Do you want to connect to a remote server? [y or n] " rmserver
|
||||
read -p "Enter the short venue name: " venuename
|
||||
|
||||
if [ $rmserver = "y" -o $rmserver = "Y" ]; then
|
||||
read -p "Enter the protocol, server host/ip, and port like "https://ip_or_host:8443" w/o quotes: " serveraddr
|
||||
read -p "Paste in (Ctrl + Shift + V on most terminal emulators) or enter the api key you generated for your server: " serverapi
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e TAM3_REMOTE=$serveraddr -e TAM3_REMOTE_KEY=$serverapi -e NODE_TLS_REJECT_UNAUTHORIZED=0 -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
elif [ -x "$(command -v podman)" ]; then
|
||||
podman run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e TAM3_REMOTE=$serveraddr -e TAM3_REMOTE_KEY=$serverapi -e NODE_TLS_REJECT_UNAUTHORIZED=0 -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
runin_podman="true"
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer and try again."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
elif [ -x "$(command -v podman )" ]; then
|
||||
podman run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
runin_podman="true"
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "TAM3 should be running on your computer. It is available at http://localhost:8300/, you should be able to create a bookmark or desktop shortcut to it."
|
||||
|
||||
if [ -n "$runin_podman" ]; then
|
||||
echo ""
|
||||
echo "This script detected that you are running Podman instead of Docker."
|
||||
echo "If that is the case you will want to either enable podman 'systemctl enable podman' and podman-restart 'systemctl enable podman-restart' on your system."
|
||||
echo "OR add a command to whichever autostart/login startup script process you prefer which runs the command 'podman start tam3-webclient'."
|
||||
echo ""
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ~/.config/TAM3/data
|
||||
|
||||
read -p "Do you want to connect to a remote server? [y or n] " rmserver
|
||||
read -p "Enter the short venue name: " venuename
|
||||
|
||||
if [ $rmserver = "y" -o $rmserver = "Y" ]; then
|
||||
read -p "Enter the protocol, server host/ip, and port like "https://ip_or_host:8443" w/o quotes: " serveraddr
|
||||
read -p "Paste in (Ctrl + Shift + V on most terminal emulators) or enter the api key you generated for your server: " serverapi
|
||||
docker run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e TAM3_REMOTE=$serveraddr -e TAM3_REMOTE_KEY=$serverapi -e NODE_TLS_REJECT_UNAUTHORIZED=0 -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
else
|
||||
docker run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p ~/.config/TAM3/data
|
||||
|
||||
read -p "Do you want to connect to a remote server? [y or n] " rmserver
|
||||
read -p "Enter the short venue name: " venuename
|
||||
|
||||
if [ $rmserver = "y" -o $rmserver = "Y" ]; then
|
||||
read -p "Enter the protocol, server host/ip, and port like "https://ip_or_host:8443" w/o quotes: " serveraddr
|
||||
read -p "Paste in (Ctrl + Shift + V on most terminal emulators) or enter the api key you generated for your server: " serverapi
|
||||
podman run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e TAM3_REMOTE=$serveraddr -e TAM3_REMOTE_KEY=$serverapi -e NODE_TLS_REJECT_UNAUTHORIZED=0 -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
else
|
||||
podman run -d --name=tam3-webclient --restart=always -v ~/.config/TAM3/data:/data:rw,z -e PUBLIC_TAM3_VENUE="$venuename" -p 127.0.0.1:8300:3000 docker.io/dbob16/tam3-webclient:0.1.0
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
read -p "Enter the name of the computer you plan to use the key on: " pcname
|
||||
|
||||
docker compose exec tam3-api /app/key.py generate $pcname
|
||||
|
||||
echo "Note the key above this line. You can use that for the computer."
|
||||
@@ -1 +0,0 @@
|
||||
docker compose exec tam3-api /app/key.py list
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
gen_password=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
|
||||
|
||||
echo "DB_LOCATION=./tam3-db" > .env
|
||||
echo "DB_PASSWORD=${gen_password}" >> .env
|
||||
|
||||
docker compose up -d
|
||||
12
deployment/remote_server/generate-key.sh
Executable file
12
deployment/remote_server/generate-key.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
read -p "Enter the name of the computer you plan to use the key on: " pcname
|
||||
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker compose exec tam3-api /app/key.py generate $pcname
|
||||
elif [ -x "$(command -v podman)" ]; then
|
||||
podman compose exec tam3-api /app/key.py generate $pcname
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer, then try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Note the key above this line. You can use that for the computer."
|
||||
7
deployment/remote_server/list-keys.sh
Executable file
7
deployment/remote_server/list-keys.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker compose exec tam3-api /app/key.py list
|
||||
elif [ -x "$(command -v podman)" ]; then
|
||||
podman compose exec tam3-api /app/key.py list
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer and try again."
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
read -p "Enter the name of the computer you plan to use the key on: " pcname
|
||||
|
||||
podman compose exec tam3-api /app/key.py generate $pcname
|
||||
|
||||
echo "Note the key above this line. You can use that for the computer."
|
||||
@@ -1 +0,0 @@
|
||||
podman compose exec tam3-api /app/key.py list
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
gen_password=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
|
||||
|
||||
echo "DB_LOCATION=./tam3-db" > .env
|
||||
echo "DB_PASSWORD=${gen_password}" >> .env
|
||||
|
||||
podman compose up -d
|
||||
15
deployment/remote_server/start-server.sh
Executable file
15
deployment/remote_server/start-server.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
gen_password=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
|
||||
|
||||
echo "DB_LOCATION=./tam3-db" > .env
|
||||
echo "DB_PASSWORD=${gen_password}" >> .env
|
||||
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker compose up -d
|
||||
elif [ -x "$(command -v podman)"]; then
|
||||
podman compose up -d
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer and try again."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
read -p "Enter the name of the computer you plan to use the key on: " pcname
|
||||
|
||||
docker compose exec tam3-api /app/key.py generate $pcname
|
||||
|
||||
echo "Note the key above this line. You can use that for the computer."
|
||||
@@ -1 +0,0 @@
|
||||
docker compose exec tam3-api /app/key.py list
|
||||
12
deployment/remote_server_secure/generate-key.sh
Executable file
12
deployment/remote_server_secure/generate-key.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
read -p "Enter the name of the computer you plan to use the key on: " pcname
|
||||
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker compose exec tam3-api /app/key.py generate $pcname
|
||||
elif [ -x "$(command -v podman)" ]; then
|
||||
podman compose exec tam3-api /app/key.py generate $pcname
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer, then try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Note the key above this line. You can use that for the computer."
|
||||
7
deployment/remote_server_secure/list-keys.sh
Executable file
7
deployment/remote_server_secure/list-keys.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker compose exec tam3-api /app/key.py list
|
||||
elif [ -x "$(command -v podman)" ]; then
|
||||
podman compose exec tam3-api /app/key.py list
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer and try again."
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
read -p "Enter the name of the computer you plan to use the key on: " pcname
|
||||
|
||||
podman compose exec tam3-api /app/key.py generate $pcname
|
||||
|
||||
echo "Note the key above this line. You can use that for the computer."
|
||||
@@ -1 +0,0 @@
|
||||
podman compose exec tam3-api /app/key.py list
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p nginx/certs
|
||||
echo "This part will ask you a bunch of questions for the self-signed cert. Answer them, I can't control it. For common name put the name or IP of the server which the clients can access it."
|
||||
openssl req -x509 -newkey rsa:4096 -keyout nginx/certs/nginx.key -out nginx/certs/nginx.crt -sha256 -days 3650 -nodes
|
||||
|
||||
gen_password=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
|
||||
|
||||
echo "DB_LOCATION=./tam3-db" > .env
|
||||
echo "DB_PASSWORD=${gen_password}" >> .env
|
||||
|
||||
podman compose up -d
|
||||
@@ -9,4 +9,11 @@ gen_password=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)
|
||||
echo "DB_LOCATION=./tam3-db" > .env
|
||||
echo "DB_PASSWORD=${gen_password}" >> .env
|
||||
|
||||
if [ -x "$(command -v docker)" ]; then
|
||||
docker compose up -d
|
||||
elif [ -x "$(command -v podman)"]; then
|
||||
podman compose up -d
|
||||
else
|
||||
echo "Neither Docker nor Podman are installed. Please install whichever you prefer and try again."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user