refactor: reorganize Docker file structure and import types separately in server.ts
This commit is contained in:
parent
2bad3dd75e
commit
fa5fb6d06e
2 changed files with 4 additions and 3 deletions
|
|
@ -15,11 +15,11 @@ WORKDIR /app
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:20-alpine
|
FROM node:20-alpine
|
||||||
COPY ./package.json package-lock.json server.js /app/
|
COPY ./package.json package-lock.json /app/
|
||||||
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
|
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
|
||||||
COPY --from=build-env /app/build /app/build
|
COPY --from=build-env /app/build /app/build
|
||||||
|
COPY --from=build-env /app/dist /app/dist
|
||||||
COPY ./drizzle /app/drizzle
|
COPY ./drizzle /app/drizzle
|
||||||
COPY ./drizzle.config.ts /app/drizzle.config.ts
|
COPY ./drizzle.config.ts /app/drizzle.config.ts
|
||||||
COPY ./server /app/server
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
CMD ["npm", "run", "start:production"]
|
CMD ["npm", "run", "start:production"]
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import compression from "compression";
|
import compression from "compression";
|
||||||
import express, { Express, Request, Response, NextFunction } from "express";
|
import express from "express";
|
||||||
|
import type { Express, Request, Response, NextFunction } from "express";
|
||||||
import morgan from "morgan";
|
import morgan from "morgan";
|
||||||
import { createServer } from "http";
|
import { createServer } from "http";
|
||||||
import type { ViteDevServer } from "vite";
|
import type { ViteDevServer } from "vite";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue