Skip to content

Commit

Permalink
fix dockerfile-entrypoint imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Dec 22, 2024
1 parent c8de19c commit c74b04c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions templates/docker-entrypoint.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
<% tab = n => (usingTabs ? "\t" : " ").repeat(n) -%>

<% if (typeModule) { -%>
import { spawn } from 'node:child_process'
import { spawn<% if (prismaFile && prismaSeed && sqlite3) { -%>, exec<% } %> } from 'node:child_process'
<% if (options.swap && !flySetup()) { -%>
import { writeFileSync } from 'node:fs'
<% } -%>
<% if (prismaFile) { -%>
import path = from 'node:path'
import fs from 'node:fs'
<% } -%>
<% } else { -%>
const { spawn } = require('node:child_process')
const { spawn<% if (prismaFile && prismaSeed && sqlite3) { -%>, exec<% } %> } = require('node:child_process')
<% if (options.swap && !flySetup()) { -%>
const { writeFileSync } = require('node:fs')
<% } -%>
<% } -%>
<% if (prismaFile) { -%>
const path = require('node:path')
const fs = require('node:fs')
<% } -%>
<% } -%>

const env = { ...process.env }

Expand Down

0 comments on commit c74b04c

Please sign in to comment.