-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workspaces): better build script and readme along with other fixes:
fix: global build errors and warnings
- Loading branch information
1 parent
68da23f
commit 70be4d4
Showing
14 changed files
with
95 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,4 +63,3 @@ export default async function Dashboard() { | |
</div> | ||
); | ||
} | ||
export const experimental_ppr = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Stardust Workspaces | ||
|
||
These are the Docker images that are used for Stardust Workspaces. They have [Starlight](https://github.com/spaceness/starlight) installed and a VNC server running. | ||
|
||
## Building | ||
|
||
```bash | ||
pnpm build | ||
``` | ||
### Options | ||
|
||
`--multi-platform`: Build for both arm64 and amd64. By default, the script builds for your host machine's arch. | ||
|
||
`--push`: Push the images to docker registry. This only exists for the GitHub workflow and for devs and serves no purpose to others. | ||
|
||
`--quiet`: Suppress logs in the console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const images = ["chromium", "debian"]; | ||
const x64Only = ["pinball"]; | ||
|
||
import { spawn } from "node:child_process"; | ||
import { argv } from "node:process"; | ||
const optionalArgs = (a) => (process.argv.includes(a) ? a : ""); | ||
function buildImage(image) { | ||
return new Promise((resolve, reject) => { | ||
const multiPlatformBuild = argv.includes("--multi-platform"); | ||
const platforms = x64Only.includes(image) ? "linux/amd64" : "linux/amd64,linux/arm64"; | ||
const process = spawn( | ||
"docker", | ||
[ | ||
"buildx", | ||
"build", | ||
".", | ||
"-f", | ||
`${image}/Dockerfile`, | ||
optionalArgs("--quiet"), | ||
optionalArgs("--push"), | ||
multiPlatformBuild ? "--platform" : "", | ||
multiPlatformBuild ? platforms : "", | ||
"--tag", | ||
`ghcr.io/spaceness/${image}`, | ||
], | ||
{ stdio: "inherit", shell: true }, | ||
); | ||
process.on("close", (code) => { | ||
if (code === 0) { | ||
resolve(0); | ||
} else { | ||
console.error(`✨ Stardust: Failed to build ${image} with code ${code}`); | ||
reject(new Error(`Build failed for ${image}`)); | ||
} | ||
}); | ||
|
||
process.on("error", (err) => { | ||
console.error(`✨ Stardust: Error while building ${image}: ${err.message}`); | ||
reject(err); | ||
}); | ||
}); | ||
} | ||
|
||
try { | ||
await Promise.all(images.map(buildImage)); | ||
console.log("✨ Stardust: All images built successfully!"); | ||
} catch (err) { | ||
console.error("✨ Stardust: One or more builds failed:"); | ||
console.error(err); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "workspaces", | ||
"version": "1.0", | ||
"type": "module", | ||
"scripts": { | ||
"build": "node build.js" | ||
}, | ||
"dependencies": { | ||
"dockerode": "^4.0.2" | ||
}, | ||
"devDependencies": { | ||
"@types/dockerode": "^3.3.32" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters