initial server stuff

This commit is contained in:
iamBadgers
2026-03-15 15:23:48 -07:00
commit 6bb60c49f4
7 changed files with 94 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
# Created by venv; see https://docs.python.org/3/library/venv.html
venv

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM python:3.14.3-trixie
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["flask", "--app", "./src/main", "run", "--host=0.0.0.0"]

18
compose.yaml Normal file
View File

@@ -0,0 +1,18 @@
services:
api:
build: .
command: ["flask", "--app", "./src/main", "--debug", "run", "--host=0.0.0.0"]
ports:
- 5000:5000
develop:
watch:
- action: sync
path: ./src
target: /app/src
- action: rebuild
path: requirements.txt
- action: rebuild
path: Dockerfile
- action: rebuild
path: compose.yaml

37
potato.yaml Normal file
View File

@@ -0,0 +1,37 @@
services:
proxy:
container_name: traefik
image: traefik
web:
build: ./foundry-manager
command: ["npm", "run", "dev"]
ports:
- 5173:5173
- 8080:8080
develop:
watch:
- action: sync
path: ./foundry-manager/src
target: /app/src
- action: rebuild
path: ./foundry-manager/package.json
- action: rebuild
path: ./foundry-manager/Dockerfile
- action: restart
path: compose.yaml
api:
build: ./server
command: ["flask", "--app", "./src/main", "--debug", "run", "--host=0.0.0.0"]
ports:
- 5000:5000
develop:
watch:
- action: sync
path: ./server/src
target: /app/src
- action: rebuild
path: ./server/requirements.txt
- action: rebuild
path: ./server/Dockerfile
- action: rebuild
path: ./server/compose.yaml

7
requirements.txt Normal file
View File

@@ -0,0 +1,7 @@
blinker==1.9.0
click==8.3.1
Flask==3.1.3
itsdangerous==2.2.0
Jinja2==3.1.6
MarkupSafe==3.0.3
Werkzeug==3.1.6

Binary file not shown.

20
src/main.py Normal file
View File

@@ -0,0 +1,20 @@
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route("/api/active_tables")
def hello():
return jsonify([{
"a": 1,
"b": "b",
"potato": "potato"
}])
@app.route("/api/tables")
def potato():
return jsonify([{
"id": 1,
"table_name": "Nuntis",
"table_link": "vtt.cyberpunkrush.com/nuntis",
"active": False
}])