Skip to content

Commit

Permalink
Fix env substitution bug in deploy (#651)
Browse files Browse the repository at this point in the history
Need to substitute env variables when checking the config file during
deploy.
  • Loading branch information
qianl15 authored Oct 19, 2024
1 parent d7d1c8a commit c3b7940
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/dbos-cloud/applications/deploy-app-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import fg from "fast-glob";
import chalk from "chalk";
import { registerApp } from "./register-app.js";
import { Logger } from "winston";
import { loadConfigFile } from "../configutils.js";
import { chooseAppDBServer } from "../databases/databases.js";
import YAML from "yaml";
import { ConfigFile } from "../configutils.js";

type DeployOutput = {
ApplicationName: string;
Expand Down Expand Up @@ -130,7 +131,8 @@ export async function deployAppCode(
const appRegistered = await isAppRegistered(logger, host, appName, userCredentials);

// If the app is not registered, register it.
const dbosConfig = loadConfigFile(dbosConfigFilePath);
const interpolatedConfig = readInterpolatedConfig(dbosConfigFilePath, logger);
const dbosConfig = YAML.parse(interpolatedConfig) as ConfigFile;

if (appRegistered === undefined) {
userDBName = await chooseAppDBServer(logger, host, userCredentials, userDBName);
Expand Down

0 comments on commit c3b7940

Please sign in to comment.