@@ -4,7 +4,6 @@ import { promisify } from "node:util";
44import * as fs from "node:fs/promises" ;
55import * as path from "node:path" ;
66import temp from "temp" ;
7- import { RivetClient } from "@rivet-gg/api-full" ;
87
98const execAsync = promisify ( exec ) ;
109
@@ -22,7 +21,7 @@ if (!RIVET_CLOUD_TOKEN || !RIVET_PROJECT || !RIVET_ENVIRONMENT) {
2221 ) ;
2322}
2423
25- export const rivet = new RivetClient ( { token : RIVET_CLOUD_TOKEN } ) ;
24+ // export const rivet = new RivetClient({ token: RIVET_CLOUD_TOKEN });
2625
2726export const app = new Hono ( ) ;
2827
@@ -102,7 +101,10 @@ app.post("/deploy/:appId", async (c) => {
102101 functions : {
103102 [ functionName ] : {
104103 build_path : "./project/" ,
105- dockerfile : "./project/Dockerfile" ,
104+ dockerfile : "./Dockerfile" ,
105+ unstable : {
106+ build_method : "remote"
107+ } ,
106108 build_args : {
107109 // See MY_ENV_VAR build args in Dockerfile
108110 MY_ENV_VAR : "custom env var" ,
@@ -137,7 +139,7 @@ app.post("/deploy/:appId", async (c) => {
137139
138140 // Get the function endpoint
139141 const endpointResult = await execAsync (
140- `rivet function endpoint --environment prod ${ functionName } ` ,
142+ `rivet function endpoint --environment ${ RIVET_ENVIRONMENT } ${ functionName } ` ,
141143 {
142144 cwd : tempDir ,
143145 } ,
@@ -151,5 +153,6 @@ app.post("/deploy/:appId", async (c) => {
151153 success : true ,
152154 appId,
153155 endpoint : endpointUrl ,
156+ buildLog : deployResult . stdout ,
154157 } ) ;
155158} ) ;
0 commit comments