(add): Some deployment files
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
deployments/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
__pycache__/
|
||||||
@@ -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
@@ -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)
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
fastapi[standard]
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
*
|
||||||
|
|
||||||
|
!build/
|
||||||
|
!package.json
|
||||||
@@ -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}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
*:8443 {
|
||||||
|
tls internal
|
||||||
|
reverse_proxy {$TAM_SERVER:localhost}:8000
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
FROM caddy:2
|
||||||
|
COPY Caddyfile /etc/caddy/Caddyfile
|
||||||
|
ENV TAM_SERVER=tam-server
|
||||||
Reference in New Issue
Block a user