Compare commits

...

1 Commits

Author SHA1 Message Date
Mir Arif Hasan
fe1d7005b5 feat: script command added in package.json 2023-11-14 15:20:35 +06:00
4 changed files with 7 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ execSync(`npx import-meta-env -x build.env -e build.env -p "/site/**/*"`)
fs.rmSync("build.env")
const caddyProcess = runChildProcessWithPrefix("caddy", ["run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"], "App/Admin Dashboard Caddy")
const backendProcess = runChildProcessWithPrefix("pnpm", ["run", "start:prod"], "Backend Server")
const backendProcess = runChildProcessWithPrefix("pnpm", ["run", "start:migrate:prod"], "Backend Server")
caddyProcess.on("exit", (code) => {
console.log(`Exiting process because Caddy Server exited with code ${code}`)

View File

@@ -23,7 +23,7 @@ FROM builder AS dev
ENV PRODUCTION="false"
CMD ["pnpm", "run", "start:dev"]
CMD ["pnpm", "run", "start:migrate:dev"]
EXPOSE 3170
@@ -32,7 +32,7 @@ FROM builder AS prod
ENV PRODUCTION="true"
CMD ["pnpm", "run", "start:prod"]
CMD ["pnpm", "run", "start:migrate:prod"]
EXPOSE 3170

View File

@@ -14,6 +14,9 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"start:migrate:dev": "prisma migrate deploy && npm run start:dev",
"start:migrate:debug": "prisma migrate deploy && npm run start:debug",
"start:migrate:prod": "prisma migrate deploy && npm run start:prod",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"postinstall": "prisma generate && pnpm run generate-gql-sdl",

View File

@@ -22,7 +22,7 @@ ENV PRODUCTION="true"
ENV PORT=3170
ENV APP_PORT=${PORT}
ENV DB_URL=${DATABASE_URL}
CMD ["pnpm", "run", "start:prod"]
CMD ["pnpm", "run", "start:migrate:prod"]
EXPOSE 3170
FROM base_builder as fe_builder