(add): Some deployment files

This commit is contained in:
2026-07-25 15:17:02 -04:00
parent 1e6b7787b3
commit 25f97c5884
10 changed files with 41 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
deployments/
+1
View File
@@ -0,0 +1 @@
__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 from dataclasses import dataclass
import uvicorn
from db import init_db from db import init_db
from fastapi import FastAPI, Header from fastapi import FastAPI, Header
import os
from routers import imp_routers from routers import imp_routers
from system.auth import AuthRepo 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)) return MainRoute(authenticated=AuthRepo().check_key(tam_key))
imp_routers(app) 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" class="{iS.normal} rounded file:bg-gray-300 file:border file:border-black file:px-2 file:py-1 file:rounded"
bind:files={uploadFile} bind:files={uploadFile}
/> />
{#if !remoteServer}
<button class={bS.gray} onclick={() => fileUpload('local')}>Upload to Local</button> <button class={bS.gray} onclick={() => fileUpload('local')}>Upload to Local</button>
{/if}
{#if remoteServer} {#if remoteServer}
<button class={bS.gray} onclick={() => fileUpload('remote')}>Upload to Remote</button> <button class={bS.gray} onclick={() => fileUpload('remote')}>Upload to Remote</button>
{/if} {/if}
+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