Massive architectural rework

This commit massively overhauls the project's structure to simplify
development. Most parts are now correctly compartmentalized and
dependencies are passed in a sane way rather than global variables
galore xd.
This commit is contained in:
Zoe
2025-05-02 12:15:40 -05:00
parent f4bf2ff5a1
commit c891c24843
50 changed files with 2684 additions and 2410 deletions

View File

@@ -0,0 +1,28 @@
CREATE TABLE IF NOT EXISTS deployments (
id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
url TEXT NOT NULL UNIQUE,
port INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS apps (
id BLOB PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
deployment_id INTEGER,
FOREIGN KEY(deployment_id) REFERENCES deployments(id)
);
CREATE TABLE IF NOT EXISTS containers (
id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
container_id TEXT NOT NULL,
head BOOLEAN NOT NULL,
deployment_id INTEGER NOT NULL,
FOREIGN KEY(deployment_id) REFERENCES deployments(id)
);
CREATE TABLE IF NOT EXISTS volumes (
id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE,
volume_id TEXT NOT NULL,
mountpoint TEXT NOT NULL,
container_id INTEGER NOT NULL,
FOREIGN KEY(container_id) REFERENCES containers(id)
);