@@ -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,8 +21,6 @@ if (!RIVET_CLOUD_TOKEN || !RIVET_PROJECT || !RIVET_ENVIRONMENT) {
2221 ) ;
2322}
2423
25- export const rivet = new RivetClient ( { token : RIVET_CLOUD_TOKEN } ) ;
26-
2724export const app = new Hono ( ) ;
2825
2926app . onError ( ( err , c ) => {
@@ -102,7 +99,10 @@ app.post("/deploy/:appId", async (c) => {
10299 functions : {
103100 [ functionName ] : {
104101 build_path : "./project/" ,
105- dockerfile : "./project/Dockerfile" ,
102+ dockerfile : "./Dockerfile" ,
103+ unstable : {
104+ build_method : "remote"
105+ } ,
106106 build_args : {
107107 // See MY_ENV_VAR build args in Dockerfile
108108 MY_ENV_VAR : "custom env var" ,
@@ -137,7 +137,7 @@ app.post("/deploy/:appId", async (c) => {
137137
138138 // Get the function endpoint
139139 const endpointResult = await execAsync (
140- `rivet function endpoint --environment prod ${ functionName } ` ,
140+ `rivet function endpoint --environment ${ RIVET_ENVIRONMENT } ${ functionName } ` ,
141141 {
142142 cwd : tempDir ,
143143 } ,
@@ -151,5 +151,6 @@ app.post("/deploy/:appId", async (c) => {
151151 success : true ,
152152 appId,
153153 endpoint : endpointUrl ,
154+ buildOutput : deployResult . stdout ,
154155 } ) ;
155156} ) ;
0 commit comments