apps: rework portBindings

ports is REST API input . Map of env var to the host port
portBinding is the database structure. Map of env var to host port, count, type etc

also, rename portCount -> count in various places to keep things consistent
This commit is contained in:
Girish Ramakrishnan
2024-07-16 22:21:36 +02:00
parent eb314ef507
commit aeddaa4566
12 changed files with 151 additions and 147 deletions

View File

@@ -118,7 +118,7 @@ CREATE TABLE IF NOT EXISTS appPortBindings(
type VARCHAR(8) NOT NULL DEFAULT "tcp",
environmentVariable VARCHAR(128) NOT NULL,
appId VARCHAR(128) NOT NULL,
count INTEGER DEFAULT 1,
count INTEGER NOT NULL DEFAULT 1,
FOREIGN KEY(appId) REFERENCES apps(id),
PRIMARY KEY(hostPort));