From 1291970b51dd579c0d3fa1aec038bfa929ba0d7e Mon Sep 17 00:00:00 2001 From: Oliver Walter Date: Wed, 27 Aug 2025 21:28:02 +0200 Subject: [PATCH] added Docker setup & moved database into instance folder --- .gitignore | 3 +- Dockerfile | 14 + docker-compose.yml | 11 + webapp/__init__.py | 7 + webapp/app.py | 3 + webapp/data/migrate.py | 59 -- webapp/data/orders.json | 1918 -------------------------------------- webapp/eve_structure.ini | 11 + webapp/storage/orders.py | 2 +- 9 files changed, 49 insertions(+), 1979 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 webapp/app.py delete mode 100644 webapp/data/migrate.py delete mode 100644 webapp/data/orders.json create mode 100644 webapp/eve_structure.ini diff --git a/.gitignore b/.gitignore index 7adeb7b..05debe5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ venv .venv webapp/data/orders.json orders.json -orders*.json \ No newline at end of file +orders*.json +instance/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..894021b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# syntax=docker/dockerfile:1 + +FROM python:3.13-slim-trixie + +WORKDIR /app + +COPY requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +COPY ./webapp /app/webapp +COPY ./main.py /app/main.py + +#CMD ["uwsgi", "eve_structure.ini"] +CMD [ "python3", "-m" , "flask", "--app", "webapp.app" , "run", "--host=0.0.0.0", "--debug"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..855a83f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +services: + eve_structure: + build: . + container_name: eve_structure + restart: always + ports: + - 5000:5000 + + # store db and other stuff outside the container (skip init-db in Dockerfile) + volumes: + - ./instance:/app/instance \ No newline at end of file diff --git a/webapp/__init__.py b/webapp/__init__.py index 01b984b..42a65f0 100644 --- a/webapp/__init__.py +++ b/webapp/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +import os from flask import Flask, render_template from datetime import datetime @@ -26,6 +27,12 @@ def create_app() -> Flask: return str(value) app.jinja_env.filters["fmt_ts"] = fmt_ts + # ensure the instance folder exists + try: + os.makedirs(app.instance_path) + except OSError: + pass + # Blueprints registrieren app.register_blueprint(structures_bp) app.register_blueprint(cookbook_bp) diff --git a/webapp/app.py b/webapp/app.py new file mode 100644 index 0000000..93793b2 --- /dev/null +++ b/webapp/app.py @@ -0,0 +1,3 @@ +from . import create_app + +app = create_app() \ No newline at end of file diff --git a/webapp/data/migrate.py b/webapp/data/migrate.py deleted file mode 100644 index b978821..0000000 --- a/webapp/data/migrate.py +++ /dev/null @@ -1,59 +0,0 @@ -import os, json -from tinydb import TinyDB -from tinydb.storages import Storage - -# Paths -OLD_FILE = "orders.json" -ARCHIVE_FILE = "orders_old.json" -NEW_FILE = "orders_new.json" # final TinyDB JSON file -TABLE_NAME = "orders" - - -class PrettyJSONStorage(Storage): - """Custom TinyDB storage that pretty-prints JSON.""" - def __init__(self, path): - self.path = path - - def read(self): - try: - with open(self.path, "r", encoding="utf-8") as f: - return json.load(f) - except FileNotFoundError: - return None - - def write(self, data): - with open(self.path, "w", encoding="utf-8") as f: - json.dump(data, f, ensure_ascii=False, indent=2) - - -def migrate(): - if not os.path.isfile(OLD_FILE): - print("No old JSON file found. Nothing to migrate.") - return - - # Load old orders - with open(OLD_FILE, "r", encoding="utf-8") as f: - orders = json.load(f) or [] - - if not orders: - print("No orders found in the old JSON.") - return - - print(orders) - - # Open TinyDB and insert into table - db = TinyDB(NEW_FILE, storage=PrettyJSONStorage) - orders_table = db.table(TABLE_NAME) - for order in orders: - orders_table.insert(order) - - # Rename old file to archive - os.rename(OLD_FILE, ARCHIVE_FILE) - os.rename(NEW_FILE, OLD_FILE) - print(f"Migrated {len(orders)} orders into table '{TABLE_NAME}'.") - print(f"Old JSON file renamed to '{ARCHIVE_FILE}'.") - print(f"New TinyDB JSON file is '{OLD_FILE}'.") - - -if __name__ == "__main__": - migrate() \ No newline at end of file diff --git a/webapp/data/orders.json b/webapp/data/orders.json deleted file mode 100644 index 74ef55c..0000000 --- a/webapp/data/orders.json +++ /dev/null @@ -1,1918 +0,0 @@ -{ - "orders": { - "1": { - "id": "eeab3f230f204cef8acc13504daaf8e8", - "status": "archived", - "created_at": "2025-08-22T17:50:31+0100", - "structure": "Raitaru", - "system": "Jita", - "industry_structure": "Raitaru", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 5, - "me": 0, - "notes": "", - "blueprint_type_id": 36971, - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Raitaru Blueprint", - "blueprintTypeId": 36971, - "buildCostPerUnit": 670302746.9, - "excessMaterialsValue": 0, - "jobCost": 864588482.31, - "materialCost": 2486925252.2, - "producedQuantity": 5, - "totalCost": 3351513734.51 - }, - "status": 200 - }, - "last_updated": "2025-08-22T18:33:41+0100", - "materials": { - "materials": [ - { - "cost": 530162121.2, - "cost_per_unit": 106032424.24, - "name": "Structure Factory", - "quantity": 5, - "type_id": 21955 - }, - { - "cost": 423720108.7, - "cost_per_unit": 84744021.74, - "name": "Structure Reprocessing Plant", - "quantity": 5, - "type_id": 21959 - }, - { - "cost": 366254166.65, - "cost_per_unit": 73250833.33, - "name": "Structure Storage Bay", - "quantity": 5, - "type_id": 21951 - }, - { - "cost": 355824107.15, - "cost_per_unit": 71164821.43, - "name": "Structure Laboratory", - "quantity": 5, - "type_id": 21953 - }, - { - "cost": 337850746.25, - "cost_per_unit": 67570149.25, - "name": "Structure Office Center", - "quantity": 5, - "type_id": 21967 - }, - { - "cost": 267633695.65, - "cost_per_unit": 53526739.13, - "name": "Structure Hangar Array", - "quantity": 5, - "type_id": 21949 - }, - { - "cost": 264145185.2, - "cost_per_unit": 52829037.04, - "name": "Structure Construction Parts", - "quantity": 5, - "type_id": 21947 - }, - { - "cost": 241490322.6, - "cost_per_unit": 48298064.52, - "name": "Structure Docking Bay", - "quantity": 5, - "type_id": 21961 - }, - { - "cost": 231656122.45, - "cost_per_unit": 46331224.49, - "name": "Structure Repair Facility", - "quantity": 5, - "type_id": 21957 - } - ] - }, - "done_at": "2025-08-22T17:50:33+0100", - "archived_at": "2025-08-22T18:33:44+0100" - }, - "2": { - "id": "78a8596d3b9746878b4e4b2f6369fce6", - "status": "archived", - "created_at": "2025-08-22T17:59:59+0100", - "structure": "Astrahus", - "system": "Jita", - "industry_structure": "Station", - "industry_rig": "T2", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "", - "blueprint_type_id": 36966, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 870994915.2, - "jobCost": 361859322.66, - "additionalCost": 0, - "totalCost": 1232854237.86, - "producedQuantity": 1, - "buildCostPerUnit": 1232854237.86, - "excessMaterialsValue": 0, - "blueprintTypeId": 36966, - "blueprintName": "Astrahus Blueprint" - } - }, - "last_updated": "2025-08-22T18:00:05+0100", - "done_at": "2025-08-22T18:00:00+0100", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 4.0, - "cost_per_unit": 166346666.67, - "cost": 665386666.68 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 1.0, - "cost_per_unit": 73250833.33, - "cost": 73250833.33 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 1.0, - "cost_per_unit": 67570149.25, - "cost": 67570149.25 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 1.0, - "cost_per_unit": 53526739.13, - "cost": 53526739.13 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 1.0, - "cost_per_unit": 52829037.04, - "cost": 52829037.04 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 1.0, - "cost_per_unit": 50834772.73, - "cost": 50834772.73 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 1.0, - "cost_per_unit": 48298064.52, - "cost": 48298064.52 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 1.0, - "cost_per_unit": 46331224.49, - "cost": 46331224.49 - } - ] - }, - "archived_at": "2025-08-22T18:29:04+0100" - }, - "3": { - "id": "052501c38f4d4185b8bd5dd67ce3aa6d", - "status": "archived", - "created_at": "2025-08-22T18:34:09+0100", - "structure": "Raitaru", - "system": "Jita", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 5, - "me": 0, - "notes": "", - "blueprint_type_id": 36971, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 2487821820.6, - "jobCost": 849994088.9, - "additionalCost": 0, - "totalCost": 3337815909.5, - "producedQuantity": 5, - "buildCostPerUnit": 667563181.9, - "excessMaterialsValue": 0, - "blueprintTypeId": 36971, - "blueprintName": "Raitaru Blueprint" - } - }, - "last_updated": "2025-08-22T18:34:10+0100", - "materials": { - "materials": [ - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 5.0, - "cost_per_unit": 106032424.24, - "cost": 530162121.2 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 5.0, - "cost_per_unit": 84744021.74, - "cost": 423720108.7 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 5.0, - "cost_per_unit": 73250833.33, - "cost": 366254166.65 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 5.0, - "cost_per_unit": 71164821.43, - "cost": 355824107.15 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 5.0, - "cost_per_unit": 67570149.25, - "cost": 337850746.25 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 5.0, - "cost_per_unit": 53526739.13, - "cost": 267633695.65 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 5.0, - "cost_per_unit": 52829037.04, - "cost": 264145185.2 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 5.0, - "cost_per_unit": 48298064.52, - "cost": 241490322.6 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 5.0, - "cost_per_unit": 46331224.49, - "cost": 231656122.45 - } - ] - }, - "done_at": "2025-08-22T18:34:14+0100", - "archived_at": "2025-08-22T18:34:17+0100" - }, - "4": { - "id": "9af714ab04464e0a87d5dc2a3d086192", - "status": "archived", - "created_at": "2025-08-22T18:38:01+0100", - "structure": "Astrahus", - "system": "Jita", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 2, - "me": 0, - "notes": "", - "blueprint_type_id": 36966, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 1724804318.7, - "jobCost": 693931640.07, - "additionalCost": 0, - "totalCost": 2418735958.77, - "producedQuantity": 2, - "buildCostPerUnit": 1209367979.38, - "excessMaterialsValue": 0, - "blueprintTypeId": 36966, - "blueprintName": "Astrahus Blueprint" - } - }, - "last_updated": "2025-08-22T18:38:06+0100", - "done_at": "2025-08-22T18:38:03+0100", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 8.0, - "cost_per_unit": 166346666.67, - "cost": 1330773333.36 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 2.0, - "cost_per_unit": 73250833.33, - "cost": 146501666.66 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 2.0, - "cost_per_unit": 67570149.25, - "cost": 135140298.5 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 2.0, - "cost_per_unit": 53526739.13, - "cost": 107053478.26 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 2.0, - "cost_per_unit": 52829037.04, - "cost": 105658074.08 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 2.0, - "cost_per_unit": 50834772.73, - "cost": 101669545.46 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 2.0, - "cost_per_unit": 48298064.52, - "cost": 96596129.04 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 2.0, - "cost_per_unit": 46331224.49, - "cost": 92662448.98 - } - ] - }, - "archived_at": "2025-08-22T18:44:46+0100" - }, - "5": { - "id": "ef59521c491d4ec48f1aa1146e6a8321", - "status": "archived", - "created_at": "2025-08-22T18:44:58+0100", - "structure": "Raitaru", - "system": "Jita", - "industry_structure": "Azbel", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 5, - "me": 0, - "notes": "", - "blueprint_type_id": 36971, - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Raitaru Blueprint", - "blueprintTypeId": 36971, - "buildCostPerUnit": 669022621.24, - "excessMaterialsValue": 0, - "jobCost": 857291285.61, - "materialCost": 2487821820.6, - "producedQuantity": 5, - "totalCost": 3345113106.21 - }, - "status": 200 - }, - "last_updated": "2025-08-22T18:45:04+0100", - "materials": { - "materials": [ - { - "cost": 530162121.2, - "cost_per_unit": 106032424.24, - "name": "Structure Factory", - "quantity": 5, - "type_id": 21955 - }, - { - "cost": 423720108.7, - "cost_per_unit": 84744021.74, - "name": "Structure Reprocessing Plant", - "quantity": 5, - "type_id": 21959 - }, - { - "cost": 366254166.65, - "cost_per_unit": 73250833.33, - "name": "Structure Storage Bay", - "quantity": 5, - "type_id": 21951 - }, - { - "cost": 355824107.15, - "cost_per_unit": 71164821.43, - "name": "Structure Laboratory", - "quantity": 5, - "type_id": 21953 - }, - { - "cost": 337850746.25, - "cost_per_unit": 67570149.25, - "name": "Structure Office Center", - "quantity": 5, - "type_id": 21967 - }, - { - "cost": 267633695.65, - "cost_per_unit": 53526739.13, - "name": "Structure Hangar Array", - "quantity": 5, - "type_id": 21949 - }, - { - "cost": 264145185.2, - "cost_per_unit": 52829037.04, - "name": "Structure Construction Parts", - "quantity": 5, - "type_id": 21947 - }, - { - "cost": 241490322.6, - "cost_per_unit": 48298064.52, - "name": "Structure Docking Bay", - "quantity": 5, - "type_id": 21961 - }, - { - "cost": 231656122.45, - "cost_per_unit": 46331224.49, - "name": "Structure Repair Facility", - "quantity": 5, - "type_id": 21957 - } - ] - }, - "done_at": "2025-08-22T18:45:10+0100", - "archived_at": "2025-08-22T18:45:16+0100" - }, - "6": { - "id": "d0b1044941d14baea9498b88afe0028b", - "status": "archived", - "created_at": "2025-08-22T18:51:04+0100", - "structure": "Sotiyo", - "system": "OGV-AS", - "industry_structure": "Sotiyo", - "industry_rig": "T2", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "Test", - "blueprint_type_id": 36973, - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Sotiyo Blueprint", - "blueprintTypeId": 36973, - "buildCostPerUnit": 23317970118.46, - "excessMaterialsValue": 0, - "jobCost": 1760383521.33, - "materialCost": 21557586597.13, - "producedQuantity": 1, - "totalCost": 23317970118.46 - }, - "status": 200 - }, - "last_updated": "2025-08-22T18:51:14+0100", - "materials": { - "materials": [ - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 80.0, - "cost_per_unit": 106032424.24, - "cost": 8482593939.2 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 80.0, - "cost_per_unit": 71164821.43, - "cost": 5693185714.4 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 60.0, - "cost_per_unit": 52829037.04, - "cost": 3169742222.4 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 40.0, - "cost_per_unit": 73250833.33, - "cost": 2930033333.2 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 40.0, - "cost_per_unit": 53526739.13, - "cost": 2141069565.2 - }, - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 10.0, - "cost_per_unit": 166346666.67, - "cost": 1663466666.7 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 10.0, - "cost_per_unit": 84744021.74, - "cost": 847440217.4 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 8.0, - "cost_per_unit": 86114000.0, - "cost": 688912000.0 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 10.0, - "cost_per_unit": 67570149.25, - "cost": 675701492.5 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 10.0, - "cost_per_unit": 50834772.73, - "cost": 508347727.3 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 10.0, - "cost_per_unit": 48298064.52, - "cost": 482980645.2 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 10.0, - "cost_per_unit": 46331224.49, - "cost": 463312244.9 - }, - { - "type_id": 36957, - "name": "Structure Acceleration Coils", - "quantity": 1.0, - "cost_per_unit": 152817857.14, - "cost": 152817857.14 - }, - { - "type_id": 36956, - "name": "Structure Electromagnetic Sensor", - "quantity": 1.0, - "cost_per_unit": 141638461.54, - "cost": 141638461.54 - }, - { - "type_id": 13267, - "name": "Janitor", - "quantity": 495.0, - "cost_per_unit": 6525.04, - "cost": 3229894.8 - }, - { - "type_id": 3810, - "name": "Marines", - "quantity": 248.0, - "cost_per_unit": 7474.2, - "cost": 1853601.6 - }, - { - "type_id": 21969, - "name": "Structure Mission Network", - "quantity": 1.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - }, - "done_at": "2025-08-22T18:52:48+0100", - "archived_at": "2025-08-22T18:53:42+0100" - }, - "7": { - "id": "e1c50bc429a74c8e8c7b849fbe18c722", - "status": "archived", - "created_at": "2025-08-22T18:51:39+0100", - "structure": "Sotiyo", - "system": "PUIG-F", - "industry_structure": "Sotiyo", - "industry_rig": "T2", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "", - "blueprint_type_id": 36973, - "materials": { - "materials": [ - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 80.0, - "cost_per_unit": 106032424.24, - "cost": 8482593939.2 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 80.0, - "cost_per_unit": 71164821.43, - "cost": 5693185714.4 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 60.0, - "cost_per_unit": 52829037.04, - "cost": 3169742222.4 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 40.0, - "cost_per_unit": 73250833.33, - "cost": 2930033333.2 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 40.0, - "cost_per_unit": 53526739.13, - "cost": 2141069565.2 - }, - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 10.0, - "cost_per_unit": 166346666.67, - "cost": 1663466666.7 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 10.0, - "cost_per_unit": 84744021.74, - "cost": 847440217.4 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 8.0, - "cost_per_unit": 86114000.0, - "cost": 688912000.0 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 10.0, - "cost_per_unit": 67570149.25, - "cost": 675701492.5 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 10.0, - "cost_per_unit": 50834772.73, - "cost": 508347727.3 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 10.0, - "cost_per_unit": 48298064.52, - "cost": 482980645.2 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 10.0, - "cost_per_unit": 46331224.49, - "cost": 463312244.9 - }, - { - "type_id": 36957, - "name": "Structure Acceleration Coils", - "quantity": 1.0, - "cost_per_unit": 152817857.14, - "cost": 152817857.14 - }, - { - "type_id": 36956, - "name": "Structure Electromagnetic Sensor", - "quantity": 1.0, - "cost_per_unit": 141638461.54, - "cost": 141638461.54 - }, - { - "type_id": 13267, - "name": "Janitor", - "quantity": 495.0, - "cost_per_unit": 6525.04, - "cost": 3229894.8 - }, - { - "type_id": 3810, - "name": "Marines", - "quantity": 248.0, - "cost_per_unit": 7474.2, - "cost": 1853601.6 - }, - { - "type_id": 21969, - "name": "Structure Mission Network", - "quantity": 1.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - }, - "last_updated": "2025-08-22T18:53:03+0100", - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Sotiyo Blueprint", - "blueprintTypeId": 36973, - "buildCostPerUnit": 23932074873.77, - "excessMaterialsValue": 0, - "jobCost": 2374488276.64, - "materialCost": 21557586597.13, - "producedQuantity": 1, - "totalCost": 23932074873.77 - }, - "status": 200 - }, - "done_at": "2025-08-22T18:52:49+0100", - "archived_at": "2025-08-22T18:53:39+0100" - }, - "8": { - "id": "f623de811a5d4d5997d826a50d4a5fa9", - "status": "archived", - "created_at": "2025-08-22T18:52:30+0100", - "structure": "Keepstar", - "system": "OGV-AS", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "", - "blueprint_type_id": 36968, - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Keepstar Blueprint", - "blueprintTypeId": 36968, - "buildCostPerUnit": 201388399181.67, - "excessMaterialsValue": 0, - "jobCost": 16671218875.77, - "materialCost": 184717180305.9, - "producedQuantity": 1, - "totalCost": 201388399181.67 - }, - "status": 200 - }, - "last_updated": "2025-08-22T18:53:14+0100", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 792.0, - "cost_per_unit": 166346666.67, - "cost": 131746560002.64 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 198.0, - "cost_per_unit": 73250833.33, - "cost": 14503664999.34 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 198.0, - "cost_per_unit": 67570149.25, - "cost": 13378889551.5 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 198.0, - "cost_per_unit": 53526739.13, - "cost": 10598294347.74 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 198.0, - "cost_per_unit": 52829037.04, - "cost": 10460149333.92 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 198.0, - "cost_per_unit": 50834772.73, - "cost": 10065285000.54 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 198.0, - "cost_per_unit": 48298064.52, - "cost": 9563016774.96 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 198.0, - "cost_per_unit": 46331224.49, - "cost": 9173582449.02 - }, - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 80.0, - "cost_per_unit": 106032424.24, - "cost": 8482593939.2 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 80.0, - "cost_per_unit": 86114000.0, - "cost": 6889120000.0 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 80.0, - "cost_per_unit": 84744021.74, - "cost": 6779521739.2 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 80.0, - "cost_per_unit": 71164821.43, - "cost": 5693185714.4 - }, - { - "type_id": 36957, - "name": "Structure Acceleration Coils", - "quantity": 8.0, - "cost_per_unit": 152817857.14, - "cost": 1222542857.12 - }, - { - "type_id": 36956, - "name": "Structure Electromagnetic Sensor", - "quantity": 8.0, - "cost_per_unit": 141638461.54, - "cost": 1133107692.32 - }, - { - "type_id": 3810, - "name": "Marines", - "quantity": 990.0, - "cost_per_unit": 7474.2, - "cost": 7399458.0 - }, - { - "type_id": 13267, - "name": "Janitor", - "quantity": 248.0, - "cost_per_unit": 6525.04, - "cost": 1618209.92 - }, - { - "type_id": 21969, - "name": "Structure Mission Network", - "quantity": 8.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - }, - "done_at": "2025-08-22T18:53:31+0100", - "archived_at": "2025-08-22T18:53:38+0100" - }, - "9": { - "id": "f6b52c14cacb440e8a15941f16cd80db", - "status": "archived", - "created_at": "2025-08-22T18:52:43+0100", - "structure": "Keepstar", - "system": "PUIG-F", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "", - "blueprint_type_id": 36968, - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 792.0, - "cost_per_unit": 166346666.67, - "cost": 131746560002.64 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 198.0, - "cost_per_unit": 73250833.33, - "cost": 14503664999.34 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 198.0, - "cost_per_unit": 67570149.25, - "cost": 13378889551.5 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 198.0, - "cost_per_unit": 53526739.13, - "cost": 10598294347.74 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 198.0, - "cost_per_unit": 52829037.04, - "cost": 10460149333.92 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 198.0, - "cost_per_unit": 50834772.73, - "cost": 10065285000.54 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 198.0, - "cost_per_unit": 48298064.52, - "cost": 9563016774.96 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 198.0, - "cost_per_unit": 46331224.49, - "cost": 9173582449.02 - }, - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 80.0, - "cost_per_unit": 106032424.24, - "cost": 8482593939.2 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 80.0, - "cost_per_unit": 86114000.0, - "cost": 6889120000.0 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 80.0, - "cost_per_unit": 84744021.74, - "cost": 6779521739.2 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 80.0, - "cost_per_unit": 71164821.43, - "cost": 5693185714.4 - }, - { - "type_id": 36957, - "name": "Structure Acceleration Coils", - "quantity": 8.0, - "cost_per_unit": 152817857.14, - "cost": 1222542857.12 - }, - { - "type_id": 36956, - "name": "Structure Electromagnetic Sensor", - "quantity": 8.0, - "cost_per_unit": 141638461.54, - "cost": 1133107692.32 - }, - { - "type_id": 3810, - "name": "Marines", - "quantity": 990.0, - "cost_per_unit": 7474.2, - "cost": 7399458.0 - }, - { - "type_id": 13267, - "name": "Janitor", - "quantity": 248.0, - "cost_per_unit": 6525.04, - "cost": 1618209.92 - }, - { - "type_id": 21969, - "name": "Structure Mission Network", - "quantity": 8.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - }, - "last_updated": "2025-08-22T18:52:43+0100", - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 184717180305.9, - "jobCost": 22486925887.51, - "additionalCost": 0, - "totalCost": 207204106193.41, - "producedQuantity": 1, - "buildCostPerUnit": 207204106193.41, - "excessMaterialsValue": 0, - "blueprintTypeId": 36968, - "blueprintName": "Keepstar Blueprint" - } - }, - "done_at": "2025-08-22T18:53:33+0100", - "archived_at": "2025-08-22T18:53:35+0100" - }, - "10": { - "id": "0cbc44a79593476a9025dd6c9bf8a125", - "status": "archived", - "created_at": "2025-08-22T18:56:27+0100", - "structure": "Fortizar", - "system": "Jita", - "industry_structure": "Azbel", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "", - "blueprint_type_id": 36967, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 9704827410.55, - "jobCost": 3901746415.31, - "additionalCost": 0, - "totalCost": 13606573825.86, - "producedQuantity": 1, - "buildCostPerUnit": 13606573825.86, - "excessMaterialsValue": 0, - "blueprintTypeId": 36967, - "blueprintName": "Fortizar Blueprint" - } - }, - "last_updated": "2025-08-22T18:56:35+0100", - "done_at": "2025-08-22T18:56:29+0100", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 40.0, - "cost_per_unit": 166346666.67, - "cost": 6653866666.8 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 10.0, - "cost_per_unit": 73250833.33, - "cost": 732508333.3 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 10.0, - "cost_per_unit": 67570149.25, - "cost": 675701492.5 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 10.0, - "cost_per_unit": 53526739.13, - "cost": 535267391.3 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 10.0, - "cost_per_unit": 52829037.04, - "cost": 528290370.4 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 10.0, - "cost_per_unit": 50834772.73, - "cost": 508347727.3 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 10.0, - "cost_per_unit": 48298064.52, - "cost": 482980645.2 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 10.0, - "cost_per_unit": 46331224.49, - "cost": 463312244.9 - }, - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 4.0, - "cost_per_unit": 106032424.24, - "cost": 424129696.96 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 4.0, - "cost_per_unit": 86114000.0, - "cost": 344456000.0 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 4.0, - "cost_per_unit": 84744021.74, - "cost": 338976086.96 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 4.0, - "cost_per_unit": 71164821.43, - "cost": 284659285.72 - } - ] - }, - "archived_at": "2025-08-22T19:01:32+0100" - }, - "11": { - "id": "981423fdcdb34d4f89a271dd0a6ad64e", - "status": "archived", - "created_at": "2025-08-23T07:02:42+0100", - "structure": "Athanor", - "system": "Jita", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 3, - "me": 0, - "notes": "", - "facility_tax": 1.5, - "blueprint_type_id": 36977, - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Athanor Blueprint", - "blueprintTypeId": 36977, - "buildCostPerUnit": 981876337.15, - "excessMaterialsValue": 0, - "jobCost": 708424074.33, - "materialCost": 2237204937.13, - "producedQuantity": 3, - "totalCost": 2945629011.46 - }, - "status": 200 - }, - "last_updated": "2025-08-23T07:03:14+0100", - "materials": { - "materials": [ - { - "cost": 762696195.66, - "cost_per_unit": 84744021.74, - "name": "Structure Reprocessing Plant", - "quantity": 9, - "type_id": 21959 - }, - { - "cost": 458453571.42, - "cost_per_unit": 152817857.14, - "name": "Structure Acceleration Coils", - "quantity": 3, - "type_id": 36957 - }, - { - "cost": 424915384.62, - "cost_per_unit": 141638461.54, - "name": "Structure Electromagnetic Sensor", - "quantity": 3, - "type_id": 36956 - }, - { - "cost": 219752499.99, - "cost_per_unit": 73250833.33, - "name": "Structure Storage Bay", - "quantity": 3, - "type_id": 21951 - }, - { - "cost": 160580217.39, - "cost_per_unit": 53526739.13, - "name": "Structure Hangar Array", - "quantity": 3, - "type_id": 21949 - }, - { - "cost": 158487111.12, - "cost_per_unit": 52829037.04, - "name": "Structure Construction Parts", - "quantity": 3, - "type_id": 21947 - }, - { - "cost": 144894193.56, - "cost_per_unit": 48298064.52, - "name": "Structure Docking Bay", - "quantity": 3, - "type_id": 21961 - }, - { - "cost": 138993673.47, - "cost_per_unit": 46331224.49, - "name": "Structure Repair Facility", - "quantity": 3, - "type_id": 21957 - } - ] - }, - "done_at": "2025-08-23T07:03:38+0100", - "archived_at": "2025-08-23T07:03:40+0100" - }, - "12": { - "id": "a8c422d3d2d44da99c169ee6847441a3", - "status": "archived", - "created_at": "2025-08-23T07:02:54+0100", - "structure": "Athanor", - "system": "Jita", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 3, - "me": 0, - "notes": "", - "facility_tax": 0.0, - "blueprint_type_id": 36977, - "materials": { - "materials": [ - { - "cost": 762696195.66, - "cost_per_unit": 84744021.74, - "name": "Structure Reprocessing Plant", - "quantity": 9, - "type_id": 21959 - }, - { - "cost": 458453571.42, - "cost_per_unit": 152817857.14, - "name": "Structure Acceleration Coils", - "quantity": 3, - "type_id": 36957 - }, - { - "cost": 424915384.62, - "cost_per_unit": 141638461.54, - "name": "Structure Electromagnetic Sensor", - "quantity": 3, - "type_id": 36956 - }, - { - "cost": 219752499.99, - "cost_per_unit": 73250833.33, - "name": "Structure Storage Bay", - "quantity": 3, - "type_id": 21951 - }, - { - "cost": 160580217.39, - "cost_per_unit": 53526739.13, - "name": "Structure Hangar Array", - "quantity": 3, - "type_id": 21949 - }, - { - "cost": 158487111.12, - "cost_per_unit": 52829037.04, - "name": "Structure Construction Parts", - "quantity": 3, - "type_id": 21947 - }, - { - "cost": 144894193.56, - "cost_per_unit": 48298064.52, - "name": "Structure Docking Bay", - "quantity": 3, - "type_id": 21961 - }, - { - "cost": 138993673.47, - "cost_per_unit": 46331224.49, - "name": "Structure Repair Facility", - "quantity": 3, - "type_id": 21957 - } - ] - }, - "last_updated": "2025-08-23T07:03:05+0100", - "cookbook": { - "error": 0, - "message": { - "additionalCost": 0, - "blueprintName": "Athanor Blueprint", - "blueprintTypeId": 36977, - "buildCostPerUnit": 971468590.75, - "excessMaterialsValue": 0, - "jobCost": 677200835.12, - "materialCost": 2237204937.13, - "producedQuantity": 3, - "totalCost": 2914405772.25 - }, - "status": 200 - }, - "done_at": "2025-08-23T07:03:39+0100", - "archived_at": "2025-08-23T07:03:41+0100" - }, - "13": { - "id": "bb5922e1671e45469ae2117dc52797e9", - "status": "archived", - "created_at": "2025-08-23T09:03:39+0100", - "structure": "Astrahus", - "system": "Jita", - "industry_structure": "Sotiyo", - "industry_rig": "T1", - "reaction_structure": "Athanor", - "reaction_rig": "None", - "quantity": 1, - "me": 0, - "notes": "", - "blueprint_type_id": 36966, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 849979504.66, - "jobCost": 346965820.03, - "additionalCost": 0, - "totalCost": 1196945324.69, - "producedQuantity": 1, - "buildCostPerUnit": 1196945324.69, - "excessMaterialsValue": 0, - "blueprintTypeId": 36966, - "blueprintName": "Astrahus Blueprint" - } - }, - "last_updated": "2025-08-23T09:11:08+0100", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 4.0, - "cost_per_unit": 166346666.67, - "cost": 665386666.68 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 1.0, - "cost_per_unit": 73250833.33, - "cost": 73250833.33 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 1.0, - "cost_per_unit": 67570149.25, - "cost": 67570149.25 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 1.0, - "cost_per_unit": 53526739.13, - "cost": 53526739.13 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 1.0, - "cost_per_unit": 52829037.04, - "cost": 52829037.04 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 1.0, - "cost_per_unit": 50834772.73, - "cost": 50834772.73 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 1.0, - "cost_per_unit": 48298064.52, - "cost": 48298064.52 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 1.0, - "cost_per_unit": 46331224.49, - "cost": 46331224.49 - } - ] - }, - "done_at": "2025-08-24T20:07:35+0100", - "archived_at": "2025-08-24T20:07:43+0100" - }, - "14": { - "id": "edbc6838474341ea8824976e0f002917", - "status": "archived", - "created_at": "2025-08-24T20:05:56+0100", - "structure": "Keepstar", - "system": "Jita", - "industry_structure": "Sotiyo", - "industry_rig": "T2", - "reaction_structure": "Tatara", - "reaction_rig": "T2", - "quantity": 1, - "me": 4, - "notes": "", - "blueprint_type_id": 36968, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 177264098991.4, - "jobCost": 77316320641.28, - "additionalCost": 0, - "totalCost": 254580419632.68, - "producedQuantity": 1, - "buildCostPerUnit": 254580419632.68, - "excessMaterialsValue": 0, - "blueprintTypeId": 36968, - "blueprintName": "Keepstar Blueprint" - } - }, - "last_updated": "2025-08-24T20:06:09+0100", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 761.0, - "cost_per_unit": 166346666.67, - "cost": 126589813335.87 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 191.0, - "cost_per_unit": 73250833.33, - "cost": 13990909166.03 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 191.0, - "cost_per_unit": 67570149.25, - "cost": 12905898506.75 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 191.0, - "cost_per_unit": 53526739.13, - "cost": 10223607173.83 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 191.0, - "cost_per_unit": 52829037.04, - "cost": 10090346074.64 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 191.0, - "cost_per_unit": 50834772.73, - "cost": 9709441591.43 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 191.0, - "cost_per_unit": 48298064.52, - "cost": 9224930323.32 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 191.0, - "cost_per_unit": 46331224.49, - "cost": 8849263877.59 - }, - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 77.0, - "cost_per_unit": 106032424.24, - "cost": 8164496666.48 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 77.0, - "cost_per_unit": 86114000.0, - "cost": 6630778000.0 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 77.0, - "cost_per_unit": 84744021.74, - "cost": 6525289673.98 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 77.0, - "cost_per_unit": 71164821.43, - "cost": 5479691250.11 - }, - { - "type_id": 36957, - "name": "Structure Acceleration Coils", - "quantity": 8.0, - "cost_per_unit": 152817857.14, - "cost": 1222542857.12 - }, - { - "type_id": 36956, - "name": "Structure Electromagnetic Sensor", - "quantity": 8.0, - "cost_per_unit": 141638461.54, - "cost": 1133107692.32 - }, - { - "type_id": 3810, - "name": "Marines", - "quantity": 951.0, - "cost_per_unit": 7474.2, - "cost": 7107964.2 - }, - { - "type_id": 13267, - "name": "Janitor", - "quantity": 238.0, - "cost_per_unit": 6525.04, - "cost": 1552959.52 - }, - { - "type_id": 21969, - "name": "Structure Mission Network", - "quantity": 8.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - }, - "done_at": "2025-08-24T20:11:33+0100", - "archived_at": "2025-08-24T20:11:34+0100" - }, - "15": { - "id": "6161fb0a512441f19acc868ca04fb28d", - "status": "done", - "created_at": "2025-08-24T20:11:31+0100", - "structure": "Astrahus", - "system": "OGV-AS", - "industry_structure": "Sotiyo", - "industry_rig": "T2", - "reaction_structure": "Athanor", - "reaction_rig": "T2", - "quantity": 5, - "me": 10, - "notes": "", - "blueprint_type_id": 36966, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 3522888982.54, - "jobCost": 354259236.5, - "additionalCost": 0, - "totalCost": 3877148219.04, - "producedQuantity": 5, - "buildCostPerUnit": 775429643.81, - "excessMaterialsValue": 0, - "blueprintTypeId": 36966, - "blueprintName": "Astrahus Blueprint" - } - }, - "last_updated": "2025-08-27T18:24:55+0000", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 18.0, - "cost_per_unit": 145699207.92, - "cost": 2622585742.56 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 5.0, - "cost_per_unit": 69402500.0, - "cost": 347012500.0 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 5.0, - "cost_per_unit": 62354310.34, - "cost": 311771551.7 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 5.0, - "cost_per_unit": 53641578.95, - "cost": 268207894.75 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 5.0, - "cost_per_unit": 51302713.18, - "cost": 256513565.9 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 5.0, - "cost_per_unit": 47849636.36, - "cost": 239248181.8 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 5.0, - "cost_per_unit": 45795813.95, - "cost": 228979069.75 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 5.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - }, - "done_at": "2025-08-27T18:28:14+0000" - }, - "16": { - "id": "acc5524d754c40b395eb46c777d67f8b", - "status": "open", - "created_at": "2025-08-27T18:24:31+0000", - "structure": "Keepstar", - "system": "K-6K16", - "industry_structure": "Sotiyo", - "industry_rig": "T2", - "reaction_structure": "Tatara", - "reaction_rig": "T2", - "quantity": 1, - "me": 10, - "notes": "This is a Note", - "blueprint_type_id": 36968, - "cookbook": { - "error": 0, - "status": 200, - "message": { - "materialCost": 152078018590.16, - "jobCost": 37609376213.64, - "additionalCost": 0, - "totalCost": 189687394803.8, - "producedQuantity": 1, - "buildCostPerUnit": 189687394803.8, - "excessMaterialsValue": 0, - "blueprintTypeId": 36968, - "blueprintName": "Keepstar Blueprint" - } - }, - "last_updated": "2025-08-27T18:25:13+0000", - "materials": { - "materials": [ - { - "type_id": 21963, - "name": "Structure Market Network", - "quantity": 713.0, - "cost_per_unit": 145699207.92, - "cost": 103883535246.96 - }, - { - "type_id": 21951, - "name": "Structure Storage Bay", - "quantity": 179.0, - "cost_per_unit": 69402500.0, - "cost": 12423047500.0 - }, - { - "type_id": 21967, - "name": "Structure Office Center", - "quantity": 179.0, - "cost_per_unit": 62354310.34, - "cost": 11161421550.86 - }, - { - "type_id": 21949, - "name": "Structure Hangar Array", - "quantity": 179.0, - "cost_per_unit": 53641578.95, - "cost": 9601842632.05 - }, - { - "type_id": 21947, - "name": "Structure Construction Parts", - "quantity": 179.0, - "cost_per_unit": 51302713.18, - "cost": 9183185659.22 - }, - { - "type_id": 21965, - "name": "Structure Medical Center", - "quantity": 179.0, - "cost_per_unit": 47849636.36, - "cost": 8565084908.44 - }, - { - "type_id": 21957, - "name": "Structure Repair Facility", - "quantity": 179.0, - "cost_per_unit": 45795813.95, - "cost": 8197450697.05 - }, - { - "type_id": 21959, - "name": "Structure Reprocessing Plant", - "quantity": 72.0, - "cost_per_unit": 80044252.87, - "cost": 5763186206.64 - }, - { - "type_id": 21953, - "name": "Structure Laboratory", - "quantity": 72.0, - "cost_per_unit": 77157671.23, - "cost": 5555352328.56 - }, - { - "type_id": 36956, - "name": "Structure Electromagnetic Sensor", - "quantity": 8.0, - "cost_per_unit": 139312500.0, - "cost": 1114500000.0 - }, - { - "type_id": 36957, - "name": "Structure Acceleration Coils", - "quantity": 8.0, - "cost_per_unit": 138731707.32, - "cost": 1109853658.56 - }, - { - "type_id": 21969, - "name": "Structure Mission Network", - "quantity": 8.0, - "cost_per_unit": 10750000.0, - "cost": 86000000.0 - }, - { - "type_id": 3810, - "name": "Marines", - "quantity": 891.0, - "cost_per_unit": 6993.19, - "cost": 6230932.29 - }, - { - "type_id": 13267, - "name": "Janitor", - "quantity": 223.0, - "cost_per_unit": 6528.82, - "cost": 1455926.86 - }, - { - "type_id": 21955, - "name": "Structure Factory", - "quantity": 72.0, - "cost_per_unit": 0.0, - "cost": 0.0 - }, - { - "type_id": 36958, - "name": "Structure Advertisement Nexus", - "quantity": 72.0, - "cost_per_unit": 0.0, - "cost": 0.0 - }, - { - "type_id": 21961, - "name": "Structure Docking Bay", - "quantity": 179.0, - "cost_per_unit": 0.0, - "cost": 0.0 - } - ] - } - } - } -} \ No newline at end of file diff --git a/webapp/eve_structure.ini b/webapp/eve_structure.ini new file mode 100644 index 0000000..8e7bce8 --- /dev/null +++ b/webapp/eve_structure.ini @@ -0,0 +1,11 @@ +[uwsgi] +chdir=/ +module = webapp.app +callable = app +socket = :5000 +processes = 4 +threads = 2 +master = true +chmod-socket = 660 +vacuum = true +die-on-term = true \ No newline at end of file diff --git a/webapp/storage/orders.py b/webapp/storage/orders.py index aee2ad0..739a2af 100644 --- a/webapp/storage/orders.py +++ b/webapp/storage/orders.py @@ -33,7 +33,7 @@ def get_db() -> TinyDB: Stored in `g` to avoid reopening the file multiple times. """ if "orders_db" not in g: - db_path = os.path.join(current_app.root_path, "data", FILE_NAME) + db_path = os.path.join(current_app.instance_path, FILE_NAME) if PRODUCTION == "dev": g.orders_db = TinyDB(db_path, storage=PrettyJSONStorage ) else: