@@ -4,7 +4,7 @@ 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" ;
7+ // import { RivetClient } from "@rivet-gg/api-full";
88
99const execAsync = promisify ( exec ) ;
1010
@@ -22,7 +22,7 @@ if (!RIVET_CLOUD_TOKEN || !RIVET_PROJECT || !RIVET_ENVIRONMENT) {
2222 ) ;
2323}
2424
25- export const rivet = new RivetClient ( { token : RIVET_CLOUD_TOKEN } ) ;
25+ // export const rivet = new RivetClient({ token: RIVET_CLOUD_TOKEN });
2626
2727export const app = new Hono ( ) ;
2828
@@ -102,7 +102,10 @@ app.post("/deploy/:appId", async (c) => {
102102 functions : {
103103 [ functionName ] : {
104104 build_path : "./project/" ,
105- dockerfile : "./project/Dockerfile" ,
105+ dockerfile : "./Dockerfile" ,
106+ unstable : {
107+ build_method : "remote"
108+ } ,
106109 build_args : {
107110 // See MY_ENV_VAR build args in Dockerfile
108111 MY_ENV_VAR : "custom env var" ,
@@ -127,7 +130,7 @@ app.post("/deploy/:appId", async (c) => {
127130
128131 // Run the deploy command
129132 const deployResult = await execAsync (
130- `rivet deploy --environment ${ RIVET_ENVIRONMENT } --non-interactive` ,
133+ `~/code/rivet/rivet/target/debug/ rivet deploy --environment ${ RIVET_ENVIRONMENT } --non-interactive` ,
131134 {
132135 cwd : tempDir ,
133136 } ,
@@ -137,7 +140,7 @@ app.post("/deploy/:appId", async (c) => {
137140
138141 // Get the function endpoint
139142 const endpointResult = await execAsync (
140- `rivet function endpoint --environment prod ${ functionName } ` ,
143+ `~/code/ rivet/rivet/target/debug/rivet function endpoint --environment ${ RIVET_ENVIRONMENT } ${ functionName } ` ,
141144 {
142145 cwd : tempDir ,
143146 } ,
@@ -151,5 +154,6 @@ app.post("/deploy/:appId", async (c) => {
151154 success : true ,
152155 appId,
153156 endpoint : endpointUrl ,
157+ buildLog : deployResult . stdout ,
154158 } ) ;
155159} ) ;
0 commit comments