Compare commits

...
3 Commits
Author SHA1 Message Date
dbob16 86a81e339c (change): Client docker deployment 2026-07-25 22:53:08 -04:00
dbob16 10f1b6fa5f (add): Docker deployments 2026-07-25 15:36:34 -04:00
dbob16 25f97c5884 (add): Some deployment files 2026-07-25 15:17:02 -04:00
19 changed files with 127 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
deployments/
+2
View File
@@ -0,0 +1,2 @@
__pycache__/
*/__pycache__/
+9
View File
@@ -0,0 +1,9 @@
FROM python:3-slim
WORKDIR /app
COPY app/requirements.txt .
RUN pip install -r requirements.txt
COPY app/. .
RUN mkdir -p /data
ENV TAM_DATA_DIR=/data
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
CMD ["fastapi", "run", "--port=8000"]
+6 -1
View File
@@ -1,7 +1,9 @@
import os
from dataclasses import dataclass
import uvicorn
from db import init_db
from fastapi import FastAPI, Header
import os
from routers import imp_routers
from system.auth import AuthRepo
@@ -29,3 +31,6 @@ def get_main_route(tam_key: str = Header("")):
return MainRoute(authenticated=AuthRepo().check_key(tam_key))
imp_routers(app)
if __name__ == "__main__":
uvicorn.run(app, port=8000)
+1
View File
@@ -0,0 +1 @@
fastapi[standard]
+4
View File
@@ -0,0 +1,4 @@
*
!build/
!package.json
+9
View File
@@ -0,0 +1,9 @@
FROM node:24-slim
WORKDIR /app
COPY . .
RUN npm install --omit=dev
RUN mkdir -p /data
ENV TAM_DATA_DIR=/data
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
ENV BODY_SIZE_LIMIT=Infinity
CMD ["node", "build"]
@@ -109,7 +109,9 @@
class="{iS.normal} rounded file:bg-gray-300 file:border file:border-black file:px-2 file:py-1 file:rounded"
bind:files={uploadFile}
/>
<button class={bS.gray} onclick={() => fileUpload('local')}>Upload to Local</button>
{#if !remoteServer}
<button class={bS.gray} onclick={() => fileUpload('local')}>Upload to Local</button>
{/if}
{#if remoteServer}
<button class={bS.gray} onclick={() => fileUpload('remote')}>Upload to Remote</button>
{/if}
+9
View File
@@ -0,0 +1,9 @@
# docker compose build
source ../../version.env
docker compose build
docker image tag dbob16/tam-client:latest dbob16/tam-client:${TAM_VERSION}
mkdir -p dist/images
echo "HOST=127.0.0.1" >> dist/prod.env
echo "PORT=3000" >> dist/prod.env
TAM_VERSION=${TAM_VERSION} envsubst < ./run-client.sh.template > ./dist/run-client.sh
chmod +x dist/run-client.sh
+9
View File
@@ -0,0 +1,9 @@
services:
tam-client:
build: ../../../client/.
image: dbob16/tam-client:latest
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
volumes:
- "./data:/data:Z"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
source ./prod.env
if [ -x "$(command -v docker)" ]; then
docker run -d --name tam-client --network host --env-file ./prod.env -v tam-data:/data --restart unless-stopped dbob16/tam-client:${TAM_VERSION}
elif [ -x "$(command -v podman)" ]; then
podman run -d --name tam-client --network host --env-file ./prod.env -v tam-data:/data --restart unless-stopped dbob16/tam-client:${TAM_VERSION}
fi
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
source ../../version.env
docker compose build
docker tag dbob16/tam-server:latest dbob16/tam-server:${TAM_VERSION}
docker tag dbob16/tam-rp:latest dbob16/tam-rp:${TAM_VERSION}
echo "TAM_PWD=changeme" > dist/prod.env
TAM_VERSION=${TAM_VERSION} envsubst '$TAM_VERSION' < ./compose.yml.template > ./dist/compose.yml
+15
View File
@@ -0,0 +1,15 @@
services:
tam-server:
build: ../../../api/.
image: dbob16/tam-server:latest
restart: unless-stopped
ports:
- "8000:8000"
tam-rp:
build: ../../../rp/.
image: dbob16/tam-rp:latest
restart: unless-stopped
environment:
- "TAM_SERVER=tam-server"
ports:
- "8443:8443"
@@ -0,0 +1,17 @@
services:
tam-server:
image: dbob16/tam-server:${TAM_VERSION}
restart: unless-stopped
environment:
- "TAM_PWD=${TAM_PWD}"
volumes:
- "./data:/data:Z"
ports:
- "8000:8000"
tam-rp:
image: dbob16/tam-rp:${TAM_VERSION}
restart: unless-stopped
environment:
- "TAM_SERVER=tam-server"
ports:
- "8443:8443"
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
if [ -x "$(command -v docker)" ]; then
docker compose --env-file ./prod.env up -d
elif [ -x "$(command -v podman)"]; then
podman compose --env-file ./prod.env up -d
fi
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
read -p "Enter new password: " NEW_PASSWORD
echo "TAM_PWD=${NEW_PASSWORD}" > prod.env
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
if [ -x "$(command -v docker)" ]; then
docker compose --env-file ./prod.env down
elif [ -x "$(command -v podman)" ]; then
podman compose --env-file ./prod.env down
fi
+4
View File
@@ -0,0 +1,4 @@
*:8443 {
tls internal
reverse_proxy {$TAM_SERVER:localhost}:8000
}
+3
View File
@@ -0,0 +1,3 @@
FROM caddy:2
COPY Caddyfile /etc/caddy/Caddyfile
ENV TAM_SERVER=tam-server