fix(docker): build runtime workspaces only
This commit is contained in:
1 parent
0b9c4d6375
commit
fbb57c8f40
3 files changed
+11
-3
No files matched your search
+2
-1
@@ -41,7 +41,8 @@ RUN --mount=type=secret,id=TURBO_API,env=TURBO_API \
|
|||||||
--mount=type=secret,id=TURBO_TEAM,env=TURBO_TEAM \
|
--mount=type=secret,id=TURBO_TEAM,env=TURBO_TEAM \
|
||||||
--mount=type=secret,id=TURBO_TOKEN,env=TURBO_TOKEN \
|
--mount=type=secret,id=TURBO_TOKEN,env=TURBO_TOKEN \
|
||||||
--mount=type=secret,id=TURBO_REMOTE_CACHE_SIGNATURE_KEY,env=TURBO_REMOTE_CACHE_SIGNATURE_KEY \
|
--mount=type=secret,id=TURBO_REMOTE_CACHE_SIGNATURE_KEY,env=TURBO_REMOTE_CACHE_SIGNATURE_KEY \
|
||||||
TURBO_PLATFORM="${TARGETPLATFORM:-linux/amd64}" pnpm build
|
TURBO_PLATFORM="${TARGETPLATFORM:-linux/amd64}" \
|
||||||
|
pnpm turbo build --filter=@homarr/nextjs... --filter=@homarr/cli
|
||||||
|
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -35,8 +35,10 @@ export const createDbInsertCollectionForTransaction = <TTableKey extends TableKe
|
|||||||
db.transaction((transaction) => {
|
db.transaction((transaction) => {
|
||||||
for (const [key, values] of objectEntries(context)) {
|
for (const [key, values] of objectEntries(context)) {
|
||||||
if (values.length >= 1) {
|
if (values.length >= 1) {
|
||||||
|
// oxlint-disable-next-line import/namespace -- TableKey limits key to exported schema tables.
|
||||||
|
const table = schema[key];
|
||||||
transaction
|
transaction
|
||||||
.insert(schema[key])
|
.insert(table)
|
||||||
.values(values as never)
|
.values(values as never)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
@@ -50,7 +52,9 @@ export const createDbInsertCollectionForTransaction = <TTableKey extends TableKe
|
|||||||
for (const [key, values] of objectEntries(context)) {
|
for (const [key, values] of objectEntries(context)) {
|
||||||
if (values.length >= 1) {
|
if (values.length >= 1) {
|
||||||
// Below is actually the mysqlSchema when the driver is mysql
|
// Below is actually the mysqlSchema when the driver is mysql
|
||||||
await transaction.insert(schema[key] as never).values(values as never);
|
// oxlint-disable-next-line import/namespace -- TableKey limits key to exported schema tables.
|
||||||
|
const table = schema[key] as never;
|
||||||
|
await transaction.insert(table).values(values as never);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ test("schemas should match", () => {
|
|||||||
if (!("uniqueName" in sqliteColumn)) return;
|
if (!("uniqueName" in sqliteColumn)) return;
|
||||||
if (!("primary" in sqliteColumn)) return;
|
if (!("primary" in sqliteColumn)) return;
|
||||||
|
|
||||||
|
// oxlint-disable-next-line import/namespace -- this test intentionally compares matching dynamic schema keys.
|
||||||
const mysqlTable = mysqlSchema[tableName];
|
const mysqlTable = mysqlSchema[tableName];
|
||||||
|
|
||||||
const mysqlColumn = mysqlTable[columnName as keyof typeof mysqlTable] as object;
|
const mysqlColumn = mysqlTable[columnName as keyof typeof mysqlTable] as object;
|
||||||
@@ -84,6 +85,7 @@ test("schemas should match", () => {
|
|||||||
).toEqual(mysqlColumn.primary);
|
).toEqual(mysqlColumn.primary);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// oxlint-disable-next-line import/namespace -- this test intentionally compares matching dynamic schema keys.
|
||||||
const mysqlTable = mysqlSchema[tableName];
|
const mysqlTable = mysqlSchema[tableName];
|
||||||
const sqliteForeignKeys = sqliteTable[Symbol.for("drizzle:SQLiteInlineForeignKeys") as keyof typeof sqliteTable] as
|
const sqliteForeignKeys = sqliteTable[Symbol.for("drizzle:SQLiteInlineForeignKeys") as keyof typeof sqliteTable] as
|
||||||
| SqliteForeignKey[]
|
| SqliteForeignKey[]
|
||||||
@@ -144,6 +146,7 @@ test("schemas should match for postgresql", () => {
|
|||||||
objectEntries(sqliteSchema).forEach(([tableName, sqliteTable]) => {
|
objectEntries(sqliteSchema).forEach(([tableName, sqliteTable]) => {
|
||||||
// keys of sqliteSchema and postgresqlSchema are the same, so we can safely use tableName as key
|
// keys of sqliteSchema and postgresqlSchema are the same, so we can safely use tableName as key
|
||||||
// skipcq: JS-E1007
|
// skipcq: JS-E1007
|
||||||
|
// oxlint-disable-next-line import/namespace -- this test intentionally compares matching dynamic schema keys.
|
||||||
const postgresqlTable = postgresqlSchema[tableName];
|
const postgresqlTable = postgresqlSchema[tableName];
|
||||||
Object.entries(sqliteTable).forEach(([columnName, sqliteColumn]: [string, object]) => {
|
Object.entries(sqliteTable).forEach(([columnName, sqliteColumn]: [string, object]) => {
|
||||||
if (!("isUnique" in sqliteColumn)) return;
|
if (!("isUnique" in sqliteColumn)) return;
|
||||||
|
|||||||
Reference in new issue
Block a user