Skip to content

Commit 8c9fc39

Browse files
committed
fix edge fucntionsecrets
1 parent 11050ec commit 8c9fc39

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

dist/index.js

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/coolify.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,9 @@ export default class Coolify {
648648
deployToken: deploymentKey,
649649
checkedOutProjectDir,
650650
resetDb: isNewSupabaseService || reset_supabase_db,
651-
postgresPassword: postgres_password
651+
postgresPassword: postgres_password,
652+
supabase_url: supabase_url,
653+
edgeFunctionSecret: edgeFunctionSecret
652654
})
653655
if (isNewSupabaseService) {
654656
//Update vault secrets
@@ -784,13 +786,17 @@ export default class Coolify {
784786
deployToken,
785787
checkedOutProjectDir,
786788
postgresPassword,
787-
resetDb
789+
resetDb,
790+
supabase_url,
791+
edgeFunctionSecret
788792
}: {
789793
serviceUUID: string
790794
deployToken: string
791795
checkedOutProjectDir: string
792796
postgresPassword: string
793797
resetDb?: boolean
798+
supabase_url: string
799+
edgeFunctionSecret: string
794800
}) {
795801
const localPort = 5432
796802
const tunnel = new TCPTunnelClient(
@@ -820,5 +826,16 @@ export default class Coolify {
820826
})
821827
console.log('Migrations pushed')
822828
tunnel.disconnect()
829+
if (resetDb) {
830+
//Need to re-set the vault secrets that get overwritten with dev defaults
831+
await this.updateSecrets({
832+
serviceUUID: serviceUUID,
833+
deployToken: deployToken,
834+
postgres_db: 'postgres',
835+
postgres_password: postgresPassword,
836+
edgeFunctionSecret: edgeFunctionSecret,
837+
supabase_url: supabase_url
838+
})
839+
}
823840
}
824841
}

0 commit comments

Comments
 (0)