some deployments worked out

This commit is contained in:
2025-10-03 18:02:40 -04:00
parent 0acfd16d96
commit fdc2349de1
26 changed files with 286 additions and 141 deletions

View File

@@ -0,0 +1,14 @@
#!/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

View File

@@ -0,0 +1,14 @@
#!/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

View File

@@ -1,6 +1,6 @@
services:
tam3-db:
image: dbob16/tam3-db:0.1.0
image: docker.io/dbob16/tam3-db:0.1.0
restart: always
environment:
MARIADB_RANDOM_ROOT_PASSWORD: 1
@@ -8,7 +8,7 @@ services:
MARIADB_USER: tam3
MARIADB_PASSWORD: ${DB_PASSWORD}
volumes:
- "${DB_LOCATION}:/var/lib/mysql"
- "${DB_LOCATION}:/var/lib/mysql:z"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
@@ -16,7 +16,7 @@ services:
timeout: 5s
retries: 3
tam3-api:
image: dbob16/tam3-api:0.1.0
image: docker.io/dbob16/tam3-api:0.1.0
restart: always
environment:
TAM3_DATA_PATH: /data
@@ -25,15 +25,4 @@ services:
TAM3_DB_USER: tam3
TAM3_DB_PASSWD: ${DB_PASSWORD}
ports:
- "8000:80"
autoheal:
deploy:
replicas: 1
environment:
AUTOHEAL_CONTAINER_LABEL: autoheal-app
image: willfarrell/autoheal:latest
network_mode: none
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- "8000:80"

View File

@@ -0,0 +1,5 @@
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."

View File

@@ -0,0 +1 @@
docker compose exec tam3-api /app/key.py list

View File

@@ -0,0 +1,8 @@
#!/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

View File

@@ -0,0 +1,5 @@
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."

View File

@@ -0,0 +1 @@
podman compose exec tam3-api /app/key.py list

View File

@@ -0,0 +1,8 @@
#!/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

View File

@@ -0,0 +1,36 @@
services:
tam3-db:
image: docker.io/dbob16/tam3-db:0.1.0
restart: always
environment:
MARIADB_RANDOM_ROOT_PASSWORD: 1
MARIADB_DATABASE: tam3
MARIADB_USER: tam3
MARIADB_PASSWORD: ${DB_PASSWORD}
volumes:
- "${DB_LOCATION}:/var/lib/mysql:rw,z"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
tam3-api:
image: docker.io/dbob16/tam3-api:0.1.0
restart: always
environment:
TAM3_DATA_PATH: /data
TAM3_DB_HOST: tam3-db
TAM3_DB_DATABASE: tam3
TAM3_DB_USER: tam3
TAM3_DB_PASSWD: ${DB_PASSWORD}
ports:
- "8000:80"
tam3-rp:
image: docker.io/nginx:stable
restart: always
ports:
- "8443:443"
volumes:
- "./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro,z"
- "./nginx/certs:/certs:ro,z"

View File

@@ -0,0 +1,5 @@
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."

View File

@@ -0,0 +1 @@
docker compose exec tam3-api /app/key.py list

View File

@@ -0,0 +1,12 @@
#!/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
docker compose up -d

View File

@@ -0,0 +1,16 @@
server {
listen 443 ssl default_server;
server_name _;
ssl_certificate /certs/nginx.crt;
ssl_certificate_key /certs/nginx.key;
location / {
proxy_pass http://tam3-api/;
proxy_set_header Host $host;
proxy_ssl_name $host;
proxy_ssl_server_name on;
proxy_ssl_session_reuse off;
}
}

View File

@@ -0,0 +1,5 @@
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."

View File

@@ -0,0 +1 @@
podman compose exec tam3-api /app/key.py list

View File

@@ -0,0 +1,12 @@
#!/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