chore: import upstream snapshot with attribution
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import asyncio
|
||||
from e2b import AsyncTemplate, default_build_logger
|
||||
from template import template
|
||||
|
||||
|
||||
async def main():
|
||||
await AsyncTemplate.build(
|
||||
template,
|
||||
"custom-app-dev",
|
||||
on_build_logs=default_build_logger(),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import asyncio
|
||||
from e2b import AsyncTemplate, default_build_logger
|
||||
from template import template
|
||||
|
||||
|
||||
async def main():
|
||||
await AsyncTemplate.build(
|
||||
template,
|
||||
"custom-app",
|
||||
on_build_logs=default_build_logger(),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
from e2b import AsyncTemplate
|
||||
|
||||
template = (
|
||||
AsyncTemplate()
|
||||
.from_image("node:18")
|
||||
.set_user("root")
|
||||
.set_workdir("/")
|
||||
.set_workdir("/app")
|
||||
.copy("server.js", ".")
|
||||
.set_user("user")
|
||||
.set_start_cmd("sudo node server.js", "curl -f http://localhost:3000/health || exit 1")
|
||||
)
|
||||
Reference in New Issue
Block a user